-
poolmanagementgroupAsked on May 27, 2017 at 11:47 AM
We are trying to find a way to limit a form submission if the date of submission is within, say, a week of the planned event. Is there a way to limit/restrict a submission in this case? For example, a pool party request must be made at least a week in advance. If someone attempts to schedule a party with less than 7 days notice, the form won't allow. Any help is appreciated.
-
Welvin Support Team LeadReplied on May 27, 2017 at 4:02 PM
You can do it this way:
1. Add two DateTime fields.
2. The first date field is where users will input the date of their party. The second date field is where you should put a default value, say the specific date of the event. Example:
Note that you can hide the Actual Date field in the form from its properties.
3. Now, get the total number of days by using our calculation widget (https://www.jotform.com/help/259-How-to-perform-calculation-in-the-form). Simply subtract the Actual Date by the Party Date. Example:
Also, note that you can hide the calculation from the form, still do it from the properties section.
4. Now, add a conditional logic that would display a text message (you should add this too) and hide the submit button if the number of days is less than seven (7):
Guide: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer.
You can check this demo form: https://www.jotform.com/71465750953968. The Actual Date is June 30, 2017. Select June 26, 2017 in the Party date to see the conditional output.
I hope that helps.