Loop & Merge block - How do I get "Submit" on the last Next Button? | XM Community
Skip to main content
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".
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.
On second thought...the JavaScript is in the attached file. Sorry I can't post it.
> @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