Change the name of a cloned button in Java Script | XM Community
Skip to main content

Change the name of a cloned button in Java Script

  • February 3, 2023
  • 3 replies
  • 61 views

Forum|alt.badge.img+5

Hello,
In my survey I require a fake "Save & continue later" button, which when clicked should lead survey takers to a specific block. I'm hoping I will be able to use embedded data to make this work.
I have been able to clone the "Next" button using Java Script. This is the script I've used:
image.pngThis clones the next button perfectly, but I'm now not able to change the name of the fake button. What am I missing in my code? Apologies if this is a simple question, I have searched the community topics and Google high and low and cannot get to the bottom of this. Also, self-taught Java Script novice here...
Here you can see how the buttons look, but I need one of the "Save and continue" buttons to say "Save & continue later"
image.pngThanks so much for advice!

3 replies

qualtrics_nerd
Level 5 ●●●●●
Forum|alt.badge.img+19
  • Level 5 ●●●●●
  • February 3, 2023

Hi KatjaT ,
You can use below code to achieve the same
newnext.innerText="Save & continue later";
Hope it resolves your query😊!!


Forum|alt.badge.img+5
  • Author
  • Level 2 ●●
  • February 3, 2023

Where would I enter this?


qualtrics_nerd
Level 5 ●●●●●
Forum|alt.badge.img+19
  • Level 5 ●●●●●
  • February 3, 2023

Hi KatjaT ,
In below code , after declaration of ID for the same (after yellow highlighted line).
image.png