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.
Support forum for Event Espresso 3 and Event Espresso 4.