concatenate several form elements into one

Home Forums Quform WordPress concatenate several form elements into one

This topic is: not resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #31276
    HninYu
    Participant

    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.

    #31304
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #31345
    HninYu
    Participant

    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);

    Attachments:
    You must be logged in to view attached files.
    #31383
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #31396
    HninYu
    Participant

    Sorry for my silly question but how can I add hidden field?

    #31413
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #31418
    HninYu
    Participant

    Thanks Ally. It is working now. But the field title appears as “Hidden” in data entries. How to change the hidden filed title? Thanks.

    #31425
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy