Home › Forums › Quform WordPress › Send label select menu Notification
- This topic has 8 replies, 4 voices, and was last updated 1 year, 7 months ago by Ally.
- AuthorPosts
- June 1, 2020 at 5:46 pm #31395benjaplqwParticipant
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
June 2, 2020 at 11:21 am #31416AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 21, 2022 at 9:49 am #34169drncParticipantCan we get a list of all labels along with unique IDs?
April 22, 2022 at 9:35 am #34173AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 22, 2022 at 12:50 pm #34175drncParticipantThanks. 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).
April 25, 2022 at 9:18 am #34178AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 26, 2022 at 11:43 am #34189drncParticipantThanks!
April 21, 2023 at 1:01 am #35417marianogiParticipantHi, 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
April 24, 2023 at 12:19 pm #35423AllySupport StaffYou 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, 7 months ago by Ally.
- AuthorPosts
- You must be logged in to reply to this topic.