I have created an event attendance form. Users will be required to enter the date they will be attending the Conference event. This question is set up as a form field that users will enter the date.
ASK:
If user enters date that is less than 30days from the date they are filling out the form I want the form to terminate. I mean i want the form to end and prevent them from completing if the current date is less than 30days from the date they enter.
I am just going to tag a few resourceful names I know who have provided assistance to other issues on this platform just to draw attention. @Deepak
Also anyone can Please help me out I'm on a timeline and would greatly appreciate any assistance you can provide.
Page 1 / 1
@Bee
You would need to do date calculation here based on input date via javascript, I would recommend using date picker for the date format to be consistent. Post which you can update an embedded data if its greater or lesser than 30 days and include branch logic either to go ahead or terminate based on it in survey flow.
Hope it helps!
I really appreciate the quick response!
@Deepak I unfortunately have very little knowledge with JavaScript and will need step by step instruction on how to get this done please. Also you mentioned embedded data, I am completely lost on how to go about that too.
I know its a lot to ask but would really appreciate any help you can provide
@Bee How about a calendar with available dates only after 30 days.
Try this.
Here you can control minDate and maxDate based on your requirement.
Thanks,
Jagdish
@Bee
To add to Jagdish’s point you can show a calendar which shows date which are 30 days from the date they are filling form through flatpickr and using min date.
Thank You soo much that was really helpful. I have been able to add the datepicker to the the question but i can’t seem to limit the selection to only 30days from the current date.
I can’t seem to figure out where to put this code you added in your response
I tried the other options mentioned in the old chats you sent but its not working.
I believe I’m not doing something right, kindly clarify for me. Thank You
@Bee
According to my understanding you wanted to terminate if user entered date that is less than 30 days.
For example, if user entered tomorrows date it should be terminated right? So, what I did is in the date picker above it won’t allow user to select the date which is within +30 days from today.
Include the header code in look n feel> general> header then edit it and click on source from the above and paste it.
Additionally, make question required>force response!
Yes @Deepak i want the survey to terminate if user selects a date less than 30days.
Look and Feel>General>Header, I clicked edit and pasted the code below
I just run some tests but the survey keeps going even when i selected 29th Nov, 30 Nov which are both less than 30days. Am i still doing something wrong please?
@Bee
Can you show how you have included it? and what are you seeing in preview?
@Deepak See screenshots below please,
@Deepak also this is what i see in preview
@Bee
You’ve included qualtrics date question remove that and include normal text entry question.
And header is incorrect click on source its and then paste the code.
@Deepak
Also the question type is already a “text entry”, I am unsure if that is what you meant.
I have made this correction. I have pasted the code in the source of the Header edit box.
After running some test again, it is still not working.
Screenshot below shows that the question was already in ‘text entry’ format. I am unsure if that is what you meant by “include normal text entry question” so please see screenshot below.
@Bee
Kindly delete the question and include new text entry or remove HTML from question.
You have now include date question from qualtrics library.
Hope it makes sense.
Yesss!!!! It works. Thank You soo much @Deepak you deserve a medal.