Changing the text of Next button for only one question | XM Community
Skip to main content

I would like to change the next button to "Yes" Instead of "next" for only ONE question.
How can I do this?

You can't change it for the question, you can change it for a Page though.
Add this to any question on the page:

document.querySelector("#NextButton").value = "Yes"


Another way is to put the question in its own Block, and change the text in the Next/Previous button text option.

image.png


It looks like the code is slightly different when using the simple layout. This worked for me in the Onload section using the Simple Layout. 

document.querySelector('#next-button').textContent = 'Submit';

 


This required slightly different class selection for me as follows:

 document.querySelector("#NextButton.NextButton.Button").value = "Submit"


Leave a Reply