Change "next" button to "I agree" button

More
5 years 7 months ago #75815 by kosburn1114
kosburn1114 created the topic: Change "next" button to "I agree" button
Hello everyone,

I found a previous thread on the forums that suggested use the following code within the welcome message will change the "next" button to read "I agree"

code
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$("#movenextbtn").val('I agree to participate');
});
</script>

/code

However, this doesn't appear to work for me. Am I doing something incorrect? Instead when I view the survey I see the code and no button has changed. I'm using 1.9+ Build 120226

I'm creating a series of surveys for use within a Delphi study so I need the participants to "agree" before they begin the study.

Thanks in advance for your help!

Cheers!

Please Log in to join the conversation.

More
5 years 7 months ago #75835 by Mazi
Mazi replied the topic: Change "next" button to "I agree" button
1. Where did you add this code?

2. Can you post a link to an activated sample survey which contains the code?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 7 months ago - 5 years 7 months ago #75885 by tpartner
tpartner replied the topic: Change "next" button to "I agree" button
Did you disable the XSS filter and enter the code in "Source" mode?

See - docs.limesurvey.org/Workarounds%3A+Manip..._etc._in_LimeSurvey_

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 7 months ago by tpartner.

Please Log in to join the conversation.

More
5 years 7 months ago #75916 by kosburn1114
kosburn1114 replied the topic: Change "next" button to "I agree" button
Ah! That was it -- the security setting was set to yes. Immediately upon setting that to No the code worked.

Brilliant!

Thanks so much for your help!

Now, if you'd like to write chapter 3 of my dissertation .... ;-)

Cheers!

Keith

Please Log in to join the conversation.

More
5 years 7 months ago #75917 by tpartner
tpartner replied the topic: Change "next" button to "I agree" button
If your dissertation is titled "Custom styles and scripts for LimeSurvey", I'd be happy to help :laugh:

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 3 months ago - 3 years 3 months ago #110243 by danika
danika replied the topic: Change "next" button to "I agree" button
Doesn't seem to work in 2.05+ It still reads "Next".
Last Edit: 3 years 3 months ago by danika. Reason: addtional information

Please Log in to join the conversation.

More
3 years 3 months ago #110246 by tpartner
tpartner replied the topic: Change "next" button to "I agree" button
That's a nice polite way to ask for help.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 3 months ago #110248 by danika
danika replied the topic: Change "next" button to "I agree" button
Hi Tony,

Any suggestions are appreciated.

Kind regards

Please Log in to join the conversation.

More
3 years 3 months ago #110251 by tpartner
tpartner replied the topic: Change "next" button to "I agree" button

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: danika

Please Log in to join the conversation.

More
3 years 3 months ago #110258 by danika
danika replied the topic: Change "next" button to "I agree" button
Thanks, I will give a shot and let's see what happens.

Best

Please Log in to join the conversation.

More
3 years 3 months ago #110263 by danika
danika replied the topic: Change "next" button to "I agree" button
Tony, thanks for a point in the right direction. On that page you made reference to the Citronade template, and that UI button functionality was disabled in it. As it so happened, that was it!

Thanks again!

Best

Please Log in to join the conversation.

More
3 years 3 months ago #110278 by danika
danika replied the topic: Change "next" button to "I agree" button

tpartner wrote: Have a look at this post - www.limesurvey.org/en/forum/design-issue...ome-page-only#105511


Tony, this worked perfectly once I switching from the Citronade template. Would there be a way now to add an "I do NOT Accept" button?

Thanks in advance.

Please Log in to join the conversation.

More
3 years 3 months ago #110291 by tpartner
tpartner replied the topic: Change "next" button to "I agree" button
What would you like to happen if that button is clicked?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 3 months ago #110294 by danika
danika replied the topic: Change "next" button to "I agree" button
onclick goto url would be ideal solution.

Please Log in to join the conversation.

More
3 years 3 months ago #110298 by tpartner
tpartner replied the topic: Change "next" button to "I agree" button
Assuming you want that button beside the "Next" button, add this to the source of the welcome message:

<script type="text/javascript" charset="utf-8">	
	$(document).ready(function() {
 
		var buttonText = 'I do NOT Accept';
		var redirectURL = 'http://google.com';		
 
		$('#movenextbtn').before('<button class="button redirect-button ui-button ui-widget ui-state-default ui-corner-all" type="button" ><span class="ui-button-text" style="padding:0 0.7em;">'+buttonText+'</span></button>');
 
		$('.redirect-button').click(function(event) {
			window.location = redirectURL;
		});
 
	});
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now