Reply To: Zapier select menus with conditions

Home Forums Quform WordPress Zapier select menus with conditions Reply To: Zapier select menus with conditions

#34084
veganwebagency
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);
	}
});

Be inspired. © 2022 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy