- Posts: 10
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Have survey submittable after a certain date?
- Darren
- Topic Author
- Offline
- New Member
Less
More
7 years 2 months ago #146798
by Darren
Have survey submittable after a certain date? was created by Darren
I want to have a survey be accessible, but not submittable, until a certain date. Is this possible?
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10630
- Thank you received: 3696
7 years 2 months ago #146800
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 Have survey submittable after a certain date?
As far as I know, not possible.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Darren
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 2 months ago #146805
by Darren
Replied by Darren on topic Have survey submittable after a certain date?
Darn, thanks for the response!
I was half hoping that someone would at least have some sort of convoluted javascript solution
I was half hoping that someone would at least have some sort of convoluted javascript solution
The topic has been locked.
- Deusdeorum
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 17
7 years 2 months ago #146828
by Deusdeorum
Replied by Deusdeorum on topic Have survey submittable after a certain date?
So you want people to be able to fill the survey but not submit it? If yes, you can disable the submit until date is passed with some alert about that you cannot submit yet, with JS, if this is the case I can provide it for you later.
The topic has been locked.
- Darren
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 2 months ago #146838
by Darren
That would work perfectly, thank you!
Replied by Darren on topic Have survey submittable after a certain date?
Deusdeorum wrote: So you want people to be able to fill the survey but not submit it? If yes, you can disable the submit until date is passed with some alert about that you cannot submit yet, with JS, if this is the case I can provide it for you later.
That would work perfectly, thank you!
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
7 years 2 months ago #146852
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Have survey submittable after a certain date?
I think of another solution, without javascript
Short text question type / hidden (or not if you ask something at end).
Validation equation at : date("YMD")>"20170601"
No js included / no way to submit with hack.
Short text question type / hidden (or not if you ask something at end).
Validation equation at : date("YMD")>"20170601"
No js included / no way to submit with hack.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Darren
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 2 months ago - 7 years 2 months ago #146872
by Darren
Replied by Darren on topic Have survey submittable after a certain date?
Last edit: 7 years 2 months ago by Darren.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
7 years 2 months ago #146873
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Have survey submittable after a certain date?
The question CAN not be hidden ... sorry : you must use hidden in CSS class, not the 'hide this question' attribute.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Deusdeorum
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 17
7 years 2 months ago #146882
by Deusdeorum
Replied by Deusdeorum on topic Have survey submittable after a certain date?
DenisChenu´s answer is probably a better approach but here's a javascript solution that disables button on click with an alert.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var date_now = new Date(); var sub_date = new Date("2017-1-10"); if (date_now < sub_date) { $('#movesubmitbtn').click(function() { $(this).prop('disabled', true); alert("You cannot submit this survey until" + sub_date); }); } }); </script>
The topic has been locked.
- Darren
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 2 months ago #146884
by Darren
Replied by Darren on topic Have survey submittable after a certain date?
Once I figured out that the question should be on the last page, and not the first, it's working splendidly. Since there's no question to add the "This question is mandatory" warning, the popup might be a little confusing. I could add a text Q at the bottom stating that attempting to submit prior to X date will result in an error.
Semi-related, is it possible to perform "date math"...specifically, something like {EXPIRY-3} (which would show the date 3 days prior to the survey's expiration)?
Semi-related, is it possible to perform "date math"...specifically, something like {EXPIRY-3} (which would show the date 3 days prior to the survey's expiration)?
The topic has been locked.
- Darren
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 2 months ago - 7 years 2 months ago #146885
by Darren
Replied by Darren on topic Have survey submittable after a certain date?
sorry for the duplicate post, didn't realize I couldn't delete my own
MOD: feel free to delete, thanks!
MOD: feel free to delete, thanks!
Last edit: 7 years 2 months ago by Darren.
The topic has been locked.
- Darren
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 2 months ago #146886
by Darren
That's awesome, thanks! I combined it with {EXPIRY} and a little date math so now it won't be submittable until X days before expiration.
Replied by Darren on topic Have survey submittable after a certain date?
Deusdeorum wrote: DenisChenu´s answer is probably a better approach but here's a javascript solution that disables button on click with an alert.
Code:<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var date_now = new Date(); var sub_date = new Date("2017-1-10"); if (date_now < sub_date) { $('#movesubmitbtn').click(function() { $(this).prop('disabled', true); alert("You cannot submit this survey until" + sub_date); }); } }); </script>
That's awesome, thanks! I combined it with {EXPIRY} and a little date math so now it won't be submittable until X days before expiration.
The topic has been locked.