Change submit button to next button

More
3 years 4 months ago #121584 by jelo
jelo created the topic: Change submit button to next button
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

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #121588 by first
first replied the topic: Change submit button to next button
Hi , Hope I understand your requirement correctly ,,

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

Survey Designer and Programmer

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #121618 by jelo
jelo replied the 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.

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #121631 by tpartner
tpartner replied the 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.

Please Log in or Create an account to join the conversation.

More
5 months 5 days ago #168562 by krosser
krosser replied the 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.15 hosted on LS servers, not installed locally.

Please Log in or Create an account to join the conversation.

More
5 months 5 days ago - 5 months 5 days ago #168565 by tpartner
tpartner replied the topic: Change submit button to next button
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: 5 months 5 days ago by tpartner.
The following user(s) said Thank You: krosser

Please Log in or Create an account to join the conversation.

More
5 months 5 days ago #168567 by krosser
krosser replied the 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.15 hosted on LS servers, not installed locally.
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
5 months 3 days ago - 5 months 3 days ago #168598 by LouisGac
LouisGac replied the 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 months 3 days ago by LouisGac.
The following user(s) said Thank You: krosser

Please Log in or Create an account to join the conversation.

More
5 months 3 days ago #168610 by krosser
krosser replied the 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.15 hosted on LS servers, not installed locally.

Please Log in or Create an account to join the conversation.

More
5 months 2 days ago #168673 by LouisGac
LouisGac replied the 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.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!