Home › Forums › Quform WordPress › Zapier select menus with conditions
- This topic has 4 replies, 2 voices, and was last updated 2 years, 8 months ago by veganwebagency.
- AuthorPosts
- February 28, 2022 at 4:30 pm #34051veganwebagencyParticipant
Hi,
Sorry for the spam, but we have a lot of applications in this project that we have never needed like this.
We have radio buttons:
Package #1
Package #2
Package #3Depending on the selection of the package, a different Select menu is displayed. This works fine.
But if we send the data via a Zapier web hook, the data of all select menus will be sent, even the hidden ones without selection.
Now we can’t see which package with which option they have selected.
Is it possible to fix this? Otherwise the Zapier webhook is not of much use.
Thanks for an answer
Best regards
ChrigiMarch 1, 2022 at 10:20 am #34057AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 1, 2022 at 10:26 am #34058veganwebagencyParticipantHi Ally,
Would be great if you could send me an example of 2. 🙂
Thanks a lot!
ChrigiMarch 2, 2022 at 10:56 am #34076AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 3, 2022 at 4:32 pm #34084veganwebagencyParticipantHi Ally,
Your method worked, but was not optimal for our application.
We solved it now with a hidden input field and JavaScript. 😀
Here is the code, in case someone else needs the same thing sometime:
jQuery(document).ready(function($) { $('.hidden-input-field').hide(); $('.packages-container input[type="radio"]').on('click', function () { selectPackage('.' + $(this).val()); }); $('.hidden-selects-container .quform-element-select select').on('change', function () { selectPackage(':visible'); }); function selectPackage(selector) { const material = $('.hidden-selects-container .quform-element-select' + selector).find('select').val(); $('.hidden-input-field input').val(material); } });
- This reply was modified 2 years, 8 months ago by veganwebagency.
- AuthorPosts
- You must be logged in to reply to this topic.