Welcome to the LimeSurvey Community Forum

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

Change the "next" button

  • yohay
  • yohay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 10 months ago #169010 by yohay
Change the "next" button was created by yohay
Hi
I need to change the 'next' button to 'to complete the survey press here'

My survey comprised of 3 groups with each group represent a survey (only one group is shown for the respondent according to an attribute's value) so with each page I need to change the text of the 'Next' button

looking around I saw that this could only be done with javascript?
Can someone direct me where I should add this JS and if the code is:
<script>
$(document).ready(function()

{

$('.ui-button-text').text('to complete the survey press here');

});
</script>

Thanks!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #169028 by tpartner
Replied by tpartner on topic Change the "next" button
What LimeSurvey version?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • yohay
  • yohay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 10 months ago #169041 by yohay
Replied by yohay on topic Change the "next" button
2.52
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago - 5 years 10 months ago #169054 by tpartner
Replied by tpartner on topic Change the "next" button
If you want to change the text for all pages/groups, add this to the end of template.js (untested because that LS version is obsolete):

Code:
$(document).on('ready pjax:scriptcomplete',function(){
  $('#movenextbtn').text('To complete the survey press here');
});


For 3.x, add this to the end of custom.js:

Code:
$(document).on('ready pjax:scriptcomplete',function(){
  $('#ls-button-submit').text('To complete the survey press here');
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 10 months ago by tpartner.
The following user(s) said Thank You: yohay
The topic has been locked.
  • yohay
  • yohay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 10 months ago #169064 by yohay
Replied by yohay on topic Change the "next" button
Thanks a lot ! worked like a charm.

BTW, Is it possible to do this per page and not for the whole survey?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #169091 by tpartner
Replied by tpartner on topic Change the "next" button

BTW, Is it possible to do this per page and not for the whole survey?

Add this to the source of any question on the page:


Version 2.x:
Code:
<script type="text/javascript" charset="utf-8">
 
  $(document).on('ready pjax:scriptcomplete',function(){
    $('#movenextbtn').text('To complete the survey press here');
  });
</script>


Version 3.x:
Code:
<script type="text/javascript" charset="utf-8">
 
  $(document).on('ready pjax:scriptcomplete',function(){
    $('#ls-button-submit').text('To complete the survey press here');
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: yohay
The topic has been locked.
  • yohay
  • yohay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 10 months ago #169113 by yohay
Replied by yohay on topic Change the "next" button
Great. Thanks a lot for the help
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose