The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Populating data from more than one field in another form
Hi I need some help with this please ?
I have two forms:
Form 1: This is used to gather client information such as first name, last name and ID number, all in different fields.
Form 2: This is used to create projects which are assigned to various clients as created in Form 1. I want to have a drop down with the list of clients from form 1 displaying First Name, Last Name and ID Number. I have tried to do this using Dynamic Dropdown but it only allows me to select one field.
How do I modify the following code so that the drop down includes a 3rd source of data from the form to include in the drop down (with ID 173):
add_filter('frm_setup_new_fields_vars', 'customize_dfe', 25, 2);
function customize_dfe( $values, $field ) {
if ( $field->id == 182 && !empty( $values['options'] ) ){//Replace 125 with the ID of your dynamic field
$temp_values = $values;
$temp_values['form_select'] = 170; //change 30 to the id of the second field you want to show in your dynamic field
$field2_opts = FrmProDynamicFieldsController::get_independent_options( $temp_values, $field );
foreach ( $values['options'] as $id => $v ) {
$values['options'][ $id ] .= ' '. $field2_opts[ $id ];
}
}
return $values;
}
Thank you very much!
February 23, 2018 at 6:10 am
Try the second of these two snippets: https://victorfont.com/add-multiple-fields-formidable-forms-drop-downs/
The snippets in this post concatenate 3 fields, you'll need to modify the snippet for 2 fields.
February 23, 2018 at 7:16 am
Worked great, thank you very much!
Discussion closed.