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

Change Text of "Next Button" based on language code

  • Jul 7, 2021 7:41 AM UTC
  • 7 replies
  • 517 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.

View original

7 replies

grahulp5
QPN Level 3 ●●●
Forum|alt.badge.img+18
  • QPN Level 3 ●●●
  • Answer
  • Jul 12, 2021 9:49 PM UTC

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
  • Jul 13, 2021 7:19 AM UTC

Hi grahulp5.
Thanks a lot. It worked perfectly.


Forum|alt.badge.img+8
  • Level 2 ●●
  • Dec 23, 2021 12:05 PM UTC

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


grahulp5
QPN Level 3 ●●●
Forum|alt.badge.img+18
  • QPN Level 3 ●●●
  • Jan 20, 2022 9:44 PM UTC

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 ●●
  • Jan 21, 2022 3:36 AM UTC

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+18
  • QPN Level 3 ●●●
  • Feb 3, 2022 8:07 PM UTC

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 ●●
  • Feb 4, 2022 4:49 AM UTC

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