Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Change "next" button to "I agree" button

Change "next" button to "I agree" button 4 years 4 months ago #75815

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!
The administrator has disabled public write access.

Change "next" button to "I agree" button 4 years 4 months ago #75835

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5974
  • Thank you received: 366
  • Karma: 260
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)limesurvey.org'"
The administrator has disabled public write access.

Change "next" button to "I agree" button 4 years 4 months ago #75885

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6111
  • Thank you received: 1356
  • Karma: 532
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: 4 years 4 months ago by tpartner.
The administrator has disabled public write access.

Change "next" button to "I agree" button 4 years 4 months ago #75916

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
The administrator has disabled public write access.

Change "next" button to "I agree" button 4 years 4 months ago #75917

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6111
  • Thank you received: 1356
  • Karma: 532
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.
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110243

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 50
  • Thank you received: 1
  • Karma: 0
Doesn't seem to work in 2.05+ It still reads "Next".
Last Edit: 2 years 4 weeks ago by danika. Reason: addtional information
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110246

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6111
  • Thank you received: 1356
  • Karma: 532
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.
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110248

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 50
  • Thank you received: 1
  • Karma: 0
Hi Tony,

Any suggestions are appreciated.

Kind regards
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110251

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6111
  • Thank you received: 1356
  • Karma: 532
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: danika

Change "next" button to "I agree" button 2 years 4 weeks ago #110258

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 50
  • Thank you received: 1
  • Karma: 0
Thanks, I will give a shot and let's see what happens.

Best
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110263

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 50
  • Thank you received: 1
  • Karma: 0
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
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110278

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 50
  • Thank you received: 1
  • Karma: 0
tpartner wrote:
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.
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110291

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6111
  • Thank you received: 1356
  • Karma: 532
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.
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110294

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 50
  • Thank you received: 1
  • Karma: 0
onclick goto url would be ideal solution.
The administrator has disabled public write access.

Change "next" button to "I agree" button 2 years 4 weeks ago #110298

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6111
  • Thank you received: 1356
  • Karma: 532
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.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.589 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form