Change Text of "Next Button" based on language code | XM Community
Skip to main content
Solved

Change Text of "Next Button" based on language code

  • July 7, 2021
  • 7 replies
  • 452 views

Forum|alt.badge.img+1

Hi everyone,
I would like to change the label/text of the last button of my survey to "Send Survey" also for other languages. I just learned how to do it for the entire survey by using JavaScript (see below).
jQuery('#NextButton').val('Send Survey');
I need a different text based on the selected language. I assume that it has to be something like a "If...then" depending on embedded data. Can anyone advise?
Thanks.
Jack.

Best answer by grahulp5

Use this in header of the script:

var a=Qualtrics.SurveyEngine.getEmbeddedData('Next') //here next is the variable used to store value for next button/ can be a pipe-in for translations
jQuery('#NextButton').val(a)

and then update the embedded variable or use that as a pipe-in from survey level itself.

7 replies

grahulp5
QPN Level 3 ●●●
Forum|alt.badge.img+13
  • QPN Level 3 ●●●
  • Answer
  • July 12, 2021

Use this in header of the script:

var a=Qualtrics.SurveyEngine.getEmbeddedData('Next') //here next is the variable used to store value for next button/ can be a pipe-in for translations
jQuery('#NextButton').val(a)

and then update the embedded variable or use that as a pipe-in from survey level itself.


Forum|alt.badge.img+1
  • Author
  • July 13, 2021

Hi grahulp5.
Thanks a lot. It worked perfectly.


Forum|alt.badge.img+8
  • Level 2 ●●
  • December 23, 2021

@grahulp5 How can we add message from Library to embedded data.


grahulp5
QPN Level 3 ●●●
Forum|alt.badge.img+13
  • QPN Level 3 ●●●
  • January 20, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/42516#Comment_42516You just need to simply add your message in library then use pipe text in survey flow to pipe it in embedded data.


Forum|alt.badge.img+8
  • Level 2 ●●
  • January 21, 2022

grahulp5 Thank you so much for your reply, but I didn't find any option to pipe the message from message library to embedded data. Only below options we are getting to pipe. Please suggest.
image.png


grahulp5
QPN Level 3 ●●●
Forum|alt.badge.img+13
  • QPN Level 3 ●●●
  • February 3, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/43081#Comment_43081MadhurSingh I couldn't find anything to get text from library. You can either use a docx or image/video to be piped.


Forum|alt.badge.img+8
  • Level 2 ●●
  • February 4, 2022

grahulp5 Thank you so much for your efforts. Yes, I used the same approach you shared.