Welcome, Guest
Username: Password: Remember me

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

Change "next" button to "I agree" button 3 months 6 days ago #110263

  • danika
  • danika's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 46
  • 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 3 months 6 days ago #110278

  • danika
  • danika's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 46
  • 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 3 months 6 days ago #110291

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4206
  • Thank you received: 790
  • Karma: 360
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Change "next" button to "I agree" button 3 months 6 days ago #110294

  • danika
  • danika's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 46
  • Karma: 0
onclick goto url would be ideal solution.
The administrator has disabled public write access.

Change "next" button to "I agree" button 3 months 6 days ago #110298

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4206
  • Thank you received: 790
  • Karma: 360
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Change "next" button to "I agree" button 3 months 6 days ago #110306

  • danika
  • danika's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 46
  • Karma: 0
Tony, thanks. But the server does not seem to like this. When I use this, I get the message: "Forbidden

You don't have permission to access /survey/index.php/admin/database/index/updatesurveylocalesettings on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

The problem seems to be whenever I try to add objects such as buttons the server objects. The host has addressed the com_security issue, and I do have XSS turned off. However, when I used your code from your earlier suggestion here and placed that within the welcome.pstpl, it worked. Would there be something you can suggest using this method in welcome.pstpl, which seems to work fine?

Thanks again
Last Edit: 3 months 6 days ago by danika. Reason: formatting
The administrator has disabled public write access.

Change "next" button to "I agree" button 3 months 6 days ago #110307

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4206
  • Thank you received: 790
  • Karma: 360
Sorry, I have no idea what's happening to cause the error. My code is strictly client-side so should have no impact on the server.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Change "next" button to "I agree" button 3 months 6 days ago #110309

  • danika
  • danika's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 46
  • Karma: 0
No worry. But, would there be an equivalent of what you posted above to use in welcome.pstpl, which seems to work just fine as opposed to posting it in the Welcome text?

Cheers
The administrator has disabled public write access.

Change "next" button to "I agree" button 3 months 6 days ago #110310

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4206
  • Thank you received: 790
  • Karma: 360
You should be able to use the same script there.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Change "next" button to "I agree" button 3 months 6 days ago #110311

  • danika
  • danika's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 46
  • Karma: 0
I tried. Server had no problem with your original suggestion. But, doesn't like this one for some reason. I am looking at how I might modify that right now and see if I can get it to work. Will post back if successful.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.114 seconds
Donation Image