Setting Field Default Values Dynamically (multiple)
-
So this may be a dumb question, I can see how to setup a function to change a field dynamically in a form, but it only seems to work on the first field I set, what if I need to change multiple fields in a single form?
add_filter( 'caldera_forms_render_get_field', function( $field ) { if( 'fld_8915153' == $field[ 'ID' ] ){ $field[ 'config' ][ 'default' ] = 125; } return $field; }, 10, 2 );
This code will only change one field but I need to fill at least 10 fields with dynamic data.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Setting Field Default Values Dynamically (multiple)’ is closed to new replies.