Change submit button to next button

More
7 years 1 week 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
7 years 1 week ago #121588 by first
Hi , Hope I understand your requirement correctly ,,

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

Survey Designer and Programmer
The topic has been locked.
More
7 years 1 week ago #121618 by jelo
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.
More
7 years 1 week ago #121631 by tpartner

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
4 years 1 month ago #168562 by krosser
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.
More
4 years 1 month ago - 4 years 1 month ago #168565 by tpartner
Try this (untested as I'm going from memory, responding via my phone):

<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: 4 years 1 month ago by tpartner.
The following user(s) said Thank You: krosser
The topic has been locked.
More
4 years 1 month ago #168567 by krosser
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
4 years 1 month ago - 4 years 1 month 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: 4 years 1 month ago by LouisGac.
The topic has been locked.
More
4 years 1 month ago #168610 by krosser

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
4 years 1 month 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.

Start now!

Just create your account and start using Limesurvey today.

Register now