Home › Forums › Quform WordPress › Zapier select menus with conditions › Reply To: Zapier select menus with conditions
March 3, 2022 at 4:32 pm #34084
Participant
Hi 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 1 year, 3 months ago by
veganwebagency.