Welcome to the LimeSurvey Community Forum

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

Change submit button to next button

  • jelo
  • jelo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
8 years 9 months ago #121584 by jelo
When linking surveys the submit button of the first survey is a bit irritating. Is there way to change the submit button into a next button?

Feature request around linking/bridging surveys is here. Would like to here from people who have linked surveys together and what workarounds they used.
bugs.limesurvey.org/view.php?id=9677

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
8 years 9 months ago #121588 by first
Replied by first on topic Change submit button to next button
Hi , Hope I understand your requirement correctly ,,

Try:
Code:
<script>
$(function(){
  $('#movesubmitbtn > span').text('Next');
})
</script>

Survey Designer and Programmer
The topic has been locked.
  • jelo
  • jelo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
8 years 9 months ago #121618 by jelo
Replied by jelo on topic Change submit button to next button
Thanks for this solution. Works as intended. Still a greenhorn in javascript/jquery. The > span looks strange on the first sight.
Thanks again.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #121631 by tpartner
Replied by tpartner on topic Change submit button to next button

The > span looks strange on the first sight.

The greater-than sign restricts the selector to direct children. So, in this case, the selector targets <span> elements that are direct children of an element with ID "movesubmitbtn".

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 10 months ago #168562 by krosser
Replied by krosser on topic Change submit button to next button
Hey guys!

Does anyone have a solution for this case, working in LS 3.+ version?

I have two surveys linked with the End-url feature and would like to change the text on the Submit button in the 1st survey so that respondents won't be confused. Basically, the "Submit" text into "Next" text, but the action of the button should stay the same.

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
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 #168565 by tpartner
Replied by tpartner on topic Change submit button to next button
Try this (untested as I'm going from memory, responding via my phone):

Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){
    $('#ls-button-submit').text('Next');
  });
</script>

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: krosser
The topic has been locked.
More
5 years 10 months ago #168567 by krosser
Replied by krosser on topic Change submit button to next button
Yeah, Tony! It works. Thank you!

P.S. a note for those, who are new to LS and might wanna use it as well, you need to include this code into the last question at the end of your survey (in question's source code).

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
The following user(s) said Thank You: LouisGac
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 10 months ago - 5 years 10 months ago #168598 by LouisGac
Replied by LouisGac on topic Change submit button to next button
In LS3 you can also do it in a more refined way.
For example, someone could edit the file navigator.twig:
github.com/LimeSurvey/LimeSurvey/blob/ma...ation/navigator.twig

and in the statement to check if the button "submit" should be shown, test if the survey has an endurl going to another survey
github.com/LimeSurvey/LimeSurvey/blob/ma...n/navigator.twig#L45
Last edit: 5 years 10 months ago by LouisGac.
The topic has been locked.
More
5 years 10 months ago #168610 by krosser
Replied by krosser on topic Change submit button to next button

LouisGac wrote: In LS3 you can also do it in a more refined way.
For example, someone could edit the file navigator.twig:
github.com/LimeSurvey/LimeSurvey/blob/ma...ation/navigator.twig

and in the statement to check if the button "submit" should be shown, test if the survey has an endurl going to another survey
github.com/LimeSurvey/LimeSurvey/blob/ma...n/navigator.twig#L45


This sounds nice. I guess it would be {% else %} for the end-url... But what is the syntax for the end-url in twig? I couldn't find it mentioned anywhere to check how it would look like.

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 10 months ago #168673 by LouisGac
Replied by LouisGac on topic Change submit button to next button

krosser wrote:

LouisGac wrote: In LS3 you can also do it in a more refined way.
For example, someone could edit the file navigator.twig:
github.com/LimeSurvey/LimeSurvey/blob/ma...ation/navigator.twig

and in the statement to check if the button "submit" should be shown, test if the survey has an endurl going to another survey
github.com/LimeSurvey/LimeSurvey/blob/ma...n/navigator.twig#L45


This sounds nice. I guess it would be {% else %} for the end-url... But what is the syntax for the end-url in twig? I couldn't find it mentioned anywhere to check how it would look like.



dump aSurveyInfo (it's still full of non necessary data), you should find it.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose