Home › Forums › Quform WordPress › concatenate several form elements into one
- This topic has 7 replies, 2 voices, and was last updated 4 years, 5 months ago by Ally.
- AuthorPosts
- May 26, 2020 at 8:37 am #31276HninYuParticipant
Is it possible to concatenate several form elements into one?
In other words, is it possible to split a single element into parts ( something like in Name)?
e.g I would like to combine 3 form elements (select menu + select menu + text) into single field in both entries view and email notification.May 27, 2020 at 10:59 am #31304AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 29, 2020 at 5:17 am #31345HninYuParticipantHi,
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);Attachments:
You must be logged in to view attached files.June 1, 2020 at 11:13 am #31383AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 2, 2020 at 2:22 am #31396HninYuParticipantSorry for my silly question but how can I add hidden field?
June 2, 2020 at 10:30 am #31413AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 2, 2020 at 12:10 pm #31418HninYuParticipantThanks Ally. It is working now. But the field title appears as “Hidden” in data entries. How to change the hidden filed title? Thanks.
June 3, 2020 at 8:07 am #31425AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.