Last active
March 20, 2020 18:09
-
-
Save vfontjr/872701b6819f820a0fd7892c8e2e3ca2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('frm_setup_new_fields_vars', 'my_repeater_counter', 20, 3); | |
function my_repeater_counter($values, $field, $args ) { | |
if ( $field->id == 234 ){ | |
$values['value'] = $args['key_pointer'] + 1; | |
} | |
return $values; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('frm_setup_new_fields_vars', 'my_repeater_counter', 20, 3); | |
function my_repeater_counter($values, $field, $args ) { | |
if ( $field->field_key == 'demo_name' ){ | |
$values['value'] = $args['key_pointer'] + 1; | |
} | |
return $values; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment