Loop & Merge block - How do I get "Submit" on the last Next Button? | XM Community
Solved

Loop & Merge block - How do I get "Submit" on the last Next Button?

  • 15 February 2018
  • 3 replies
  • 11 views

Userlevel 4
Badge +5
When a survey ends in a Loop & Merge Block, how can I ensure that the very last Next button has the "Submit" text that I want? All other instances of the Next Button should just say "Next".
icon

Best answer by TomG 15 February 2018, 01:11

View original

3 replies

Userlevel 7
Badge +27
You can write a JavaScript that checks if the piped in current loop number (lm://CurrentLoopNumber) is equal to the piped in total loops (lm://TotalLoops). If it is, change the NextButton value and title attribute. I would post the code, but I get an "Access Denied" error when I try.
Userlevel 7
Badge +27
On second thought...the JavaScript is in the attached file. Sorry I can't post it.
Userlevel 4
Badge +5
> @TomG said:
> You can write a JavaScript that checks if the piped in current loop number (lm://CurrentLoopNumber) is equal to the piped in total loops (lm://TotalLoops). If it is, change the NextButton value and title attribute. I would post the code, but I get an "Access Denied" error when I try.

I dig it. I'm always looking for a more "out of the box" solution, but checking against total loops works. Going to play around with some JS today or tomorrow.

Leave a Reply