Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Dependent Questions | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Dependent Questions

Dependent Questions

Posted: November 26, 2013 at 12:08 am

Viewing 1 reply thread


Leesa

November 26, 2013 at 12:08 am

Hi there!
I have questions which are dependent on the answer above….

For example

Do you have travel insurance? Yes/No
If yes, please list your travel insurance information

Is there anyway that I can only have the If yes show if they select yes?

Thank you!

Leesa


Josh

November 26, 2013 at 8:04 am

Hi Leesa,

It turns out that Event Espresso doesn’t have a built in way to manage conditional or dependent questions. However, since each question has its own ID a bit of jQuery can be used to hide/show questions based on the answer given for another question.

Here is a code snippet that shows an example of how one question can be hidden then made to appear if the question before it is answered yes:

<script>
jQuery(document).ready(function($){
	
	$("label[for='DROPDOWN_63'],select[name='DROPDOWN_63']").hide(); //the question label and dropdown you want hidden 

	$("select[name='DROPDOWN_62']").change(function(){ //the question that if answered Yes makes the next question display
		var myoptionValue = $("select[name='DROPDOWN_62']").val();
	if (myoptionValue == "Yes") {
		$("label[for='DROPDOWN_63'],select[name='DROPDOWN_63']").show();
	} else {
		$("label[for='DROPDOWN_63'],select[name='DROPDOWN_63']").hide();
	}

	});

});
</script>
Viewing 1 reply thread

The support post ‘Dependent Questions’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server