Solved
How do I make previous buttons disappear on selected questions?
I am trying to have the previous button not show up on selected questions. I have tried two custom java scripts (see below), but if the question is answered incorrectly on the page with the java script (i.e. the error message appears), the previous button reappears and you can go back.
I am aware of the solution of dividing it into blocks and using branches, however the survey is quite extensive and this would require 50+ additional blocks and branches in an already complicated flow. The other option is of course to remove them completely but this makes other parts of the survey difficult.
Is there a way to do this with custom script so that the previous button stays hidden even when the question is answered incorrectly?
Java Scripts I tried (when loading, when displayed, when unloading):
$('PreviousButton').hide();
$('PreviousButton').disable();
OR
{
$('PreviousButton').hide();
});
Best answer by Anonymous
Hello @ASFriesacher ,
Paste the below code in the js(onReady) of the question
if(jQuery(".ValidationError").text()==""){
jQuery("#PreviousButton").hide();
}else{
jQuery("#PreviousButton").css("visibility","collapse");
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
