- Posts: 10
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
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.
<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>
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>