Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to change the text on the "Next", "Previous" and "Submit" buttons separately

  • ipolit
  • ipolit's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 week ago - 4 years 1 week ago #196463 by ipolit
I'd like to change the text on all three of those buttons, with different text in each one.

From a previous post, this js script changes the button for both next and submit:
Code:
$(document).on('ready pjax:scriptcomplete',function(){
  $('#ls-button-submit').text('To complete the survey press here');
});
Last edit: 4 years 1 week ago by ipolit.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 week ago #196467 by Joffm
Surround it by the <script> tag, add it to the question text and this way you are able to change the text on each page separately.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • ipolit
  • ipolit's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 week ago #196493 by ipolit
Thank you for your answer!

This allows me to change the "next" and "submit" buttons depending on the page.

Is there a way to change the "previous" button too?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 week ago - 4 years 1 week ago #196512 by tpartner
Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){
    $('#ls-button-previous').text('New previous text');
    });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 1 week ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose