• Hi All,

    I have a contact form. On a dropdown, depending of the value chosen by the user – I’m making the other field hidden( where attending is the ID given to the select, and No the value chosen) via

    /*! jQuery script to hide certain form fields */
    
    $(document).ready(function() {
    
    	//Hide the field initially
    	$("#hide1").hide();
    
    	//Show the text field only when the third option is chosen - this doesn't
    	$('#attending').change(function() {
    		if ($("#attending").val() == "Yes") {
    			$("#hide1").show();
    		}
    		else {
    			$("#hide1").hide();
    		}
    	});
    });

    Which work great.

    Otherwise, the user can not submit the form as the field being hidden doesn’t have any value.

    Is there any possibility than those fields doesn’t get mandatory anymore one the Value No is chosen ? It will be lovely,

    Thank you for your help !

  • The topic ‘[CONTACT FORM 7] When one value is chosen – make field not mandatory anymore’ is closed to new replies.