Zapier select menus with conditions

Home Forums Quform WordPress Zapier select menus with conditions

This topic is: resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34051
    veganwebagency
    Participant

    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 #3

    Depending 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
    Chrigi

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

    #34058
    veganwebagency
    Participant

    Hi Ally,

    Would be great if you could send me an example of 2. 🙂

    Thanks a lot!
    Chrigi

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

    #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);
    	}
    });
    
    
Viewing 5 posts - 1 through 5 (of 5 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