Solved
Change submit button text conditionally according to question answer?
Is it possible to change the text of the submit button according to a selection on a multiple choice question (on the same page)?
What we are looking to do: if respondent chooses choices one - three, which will result in the survey ending, we want the submit button to say "Submit"; if they choose choice four, which will result in them being redirected to another form, we want the submit button to say something like, "Tell us more about yourself".
Is this possible? Thanks in advance for your thoughts.
Best answer by Anonymous
Hello @brendontroy ,
Assuming you have four option and "Tell us more about yourself" is for the last option then you can paste the below code in the js(onReady) of the question
jQuery("#NextButton").attr({value:"Submit",title:"Submit"});
jQuery('input[type=radio]').change(function() {
if(jQuery("input[type='radio']:last").is(':checked')){
jQuery("#NextButton").attr({value:"Tell us more about yourself",title:"Tell us more about yourself"});}else{
jQuery("#NextButton").attr({value:"Submit",title:"Submit"});}
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
