- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
- UdoHolzmann
- Topic Author
- Offline
- New Member
Less
More
5 years 1 month ago - 5 years 1 month ago #181065
by UdoHolzmann
Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9 was created by UdoHolzmann
Hi. I have seen this issue discussed with earlier versions of LS. I am using 3.15.9.
At the very end of my survey (last question of last group), I want the user to confirm that they are ready to submit their Information after clicking "Yes" using a radio button or Yes/No box option.
Any ideas on the JavaScript needed for this?
Thanks.
At the very end of my survey (last question of last group), I want the user to confirm that they are ready to submit their Information after clicking "Yes" using a radio button or Yes/No box option.
Any ideas on the JavaScript needed for this?
Thanks.
Last edit: 5 years 1 month ago by UdoHolzmann.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12784
- Thank you received: 3940
5 years 1 month ago #181067
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
Hi,
what do you want to happen if the user clicks "No"?
Joffm
what do you want to happen if the user clicks "No"?
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- UdoHolzmann
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 1 month ago #181068
by UdoHolzmann
Replied by UdoHolzmann on topic Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
The "Submit" button should remain hidden. Thanks.
The topic has been locked.
- UdoHolzmann
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 1 month ago #181129
by UdoHolzmann
Replied by UdoHolzmann on topic Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
Anyone? Please...
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3696
5 years 1 month ago #181149
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 Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
If using a Yes/No type question, you can add a script like this to the question source:
Sample survey attached:
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Hide the submit button $('#ls-button-submit').hide(); // Listener on the yes/no answers $('#question{QID} input:radio').on('change', function(e) { if($('#question{QID} input:radio:checked:eq(0)').val() == 'Y') { $('#ls-button-submit').fadeIn(500); } else { $('#ls-button-submit').fadeOut(500); } }); }); </script>
Sample survey attached:
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: NoraSalasIllanes
The topic has been locked.
- UdoHolzmann
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 1 month ago #181151
by UdoHolzmann
Replied by UdoHolzmann on topic Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
Thanks. I will give this a try. Dumb question: where is the question source? You mean click "source" in the text box where I write my question and paste there?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3696
5 years 1 month ago #181153
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 Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
See this article about how to add JavaScript -
manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- UdoHolzmann
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 1 month ago #181154
by UdoHolzmann
Replied by UdoHolzmann on topic Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
Thanks. That helps a lot.
In your code above, do I have to edit "#question{QID}" to "#question1234"?
In your code above, do I have to edit "#question{QID}" to "#question1234"?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3696
5 years 1 month ago #181158
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 Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
Nope, the {QID} placeholder will automatically return the question ID.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- UdoHolzmann
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 4 weeks ago #181164
by UdoHolzmann
Replied by UdoHolzmann on topic Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
Awesome. It does work. Thank you much!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10632
- Thank you received: 3696
4 years 11 months ago #182505
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 Show "Submit" Button AFTER "Yes" (Radio or Yes/no) v3.15.9
That does not target a specific question.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.