Home › Forums › Quform WordPress › concatenate several form elements into one › Reply To: concatenate several form elements into one
Hi,
I am trying to follow your suggestion but the combined field was not shown either in email for form entries.
In NRC-1 (1_194), NRC-2 (1_191)& NRC-3 (1_193), I set OFF “show in email” and “save to database” options and I turn ON those options only in the combined field (1_196), as shown in attachment.
In order to hide the combined field, I enabled conditional logic and set some rules to make sure the field is not appear on the form.
and I write the following codes in code snipper plugin, but it is not working. Please suggest me how to solve this.
add_filter(‘quform_post_validate_1’, function (array $result, Quform_Form $form) {
$combined = $form->getValue(‘quform_1_194’) . $form->getValue(‘quform_1_191’) . $form->getValue(‘quform_1_193’);
$form->setValue(‘quform_1_196’, $combined);
return $result;
}, 10, 2);