Send label select menu Notification

Home Forums Quform WordPress Send label select menu Notification

This topic is: resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #31395
    benjaplqw
    Participant

    Hello,
    I would like to know how the label and value data of the Select menu could be sent. I need to know both values ​​when mailing them.

    Sorry for my basic English. Hope it’s understandable

    #31416
    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.

    #34169
    drnc
    Participant

    Can we get a list of all labels along with unique IDs?

    #34173
    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.

    #34175
    drnc
    Participant

    Thanks. Can I get a list of the unique IDs in PHP since I need to process some of the field values, but not all. And unique IDs do not have the same id with the questions in a form that has 220 items (that has already been sent).

    #34178
    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.

    #34189
    drnc
    Participant

    Thanks!

    #35417
    marianogi
    Participant

    Hi, Ally. I don’t know why your code does not work for me, I never get the label value.

    I get the value with:


    add_filter('quform_post_process_1', function (array $result, Quform_Form $form) {
    $data = array(
    'provincia' => $form->getValue('quform_1_17')
    );
    }, 10, 3);

    And also this:

    function add_option_label_to_value($value, Quform_Element_Multi $element, Quform_Form $form) {
    if ($form->config('environment') == 'frontend') {
    foreach ($element->getOptions() as $option) {
    if ($option['value'] == $value) {
    $value = esc_html($option['label']) . ' (' . $value . ')';
    }
    }
    }
    return $value;
    }
    add_filter('quform_get_value_html_1_17', 'add_option_label_to_value', 10, 3);

    So why I don’t get this value: esc_html($option[‘label’]) . ‘ (‘ . $value . ‘)’ when I read the value: $data[‘provincia’] ?

    I read the the value as if the ‘quform_get_value_html’ code wouldn’t exists.

    I don’t know what I am doing wrong. Thank you for your help

    #35423
    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.

    • This reply was modified 1 year, 5 months ago by Ally.
Viewing 9 posts - 1 through 9 (of 9 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