- Posts: 10635
- Thank you received: 3698
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Change "next" button to "I agree" button
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
9 years 9 months ago #110291
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on 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.
The topic has been locked.
- danika
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
9 years 9 months ago #110294
by danika
Replied by danika on topic Change "next" button to "I agree" button
onclick goto url would be ideal solution.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3698
9 years 9 months ago #110298
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on 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:
Code:
<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 topic has been locked.
- danika
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
9 years 9 months ago - 9 years 9 months ago #110306
by danika
Replied by danika on topic Change "next" button to "I agree" button
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
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: 9 years 9 months ago by danika. Reason: formatting
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3698
9 years 9 months ago #110307
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change "next" button to "I agree" button
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.
The topic has been locked.
- danika
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
9 years 9 months ago #110309
by danika
Replied by danika on topic Change "next" button to "I agree" button
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
Cheers
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10635
- Thank you received: 3698
9 years 9 months ago #110310
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change "next" button to "I agree" button
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.
The topic has been locked.
- danika
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
9 years 9 months ago #110311
by danika
Replied by danika on topic Change "next" button to "I agree" button
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 topic has been locked.
- danika
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
9 years 9 months ago #110312
by danika
Replied by danika on topic Change "next" button to "I agree" button
If it matters, I am trying this with the Vallendar template.
The topic has been locked.