What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
On your form, http://www.jotform.com/60044241786352, I'm seeing Departure Date and Arrival Date fields. When you say wrong dates, are you referring to the dates from the past and you don't want your submitters to accidentally select dates from the past, correct?
I have checked your form and it seems that you have already made the fields not able to accept past dates.
If this is not what you are referring to, kindly give us more details about your concern so we can further help you. We will wait for your response. Thank you.
I’ve 2 issues with the dates.
Since the dates are referring to the beginning and ending of a stay in our B&B
there are 2 separate demands:
(1) both dates must be in the future
(2) the end-date must be AFTER the start-date.
Now, I know that the first issue is an option that can be ‘checked’ within both fields.
However, I’ve not figured out how I can make the end-date always later than the start-date.
I guess I’ve to create separate calculation fields that contain the difference between these two dates as an integer.
Would that be the way to handle this, or is there another way?
B&B Huize Nijmegen,
Thank you for providing us additional information.
It is not possible to prevent users to choose End date that is before Start date.
Possible workaround is to add Form calculation field that will calculate difference between dates and then if calculation is less that 0, you can use conditional logic to hide submit button so your users will not be able to submit your form if End date is before Start date. You can also add text field that will notify your users that End date can not be before Start date.
Instead of hiding submit button field, you can also use Enable/Require field condition and disable submit button.
Here is my demo form: https://form.jotform.com/60172652512953
Feel free to clone it.
Hope this will help. Let us know if you need further assistance.
Thank you so much.
This is exactly what I would like to achieve.
I’ll try this and implement it in my form
B&B Huize Nijmegen
On behalf of my colleague you are most welcome.
Let us know if you need additional support.
Just a remark after implementing your solution using a calculation field.
Pffff, … I found it.
The addition of a calculation field is … very well hidden.
It took me some time to:
* discover that this is not a regular field but a widget (strange name BTW)
* which is - by default - NOT shown under the list of widgets
* and only shown if you “search" for it
* then it pops out of thin air ...
and i was confused about
* the meaning of some “advanced options” of the calculation wizard:
such as: “wait for input before including the field in calculation”
This latter option, I presume, is to prevent calculations before the variables are filled.
But what then is the value of such a calculation field if not all fields are filled?
Zero? or is it the pre-populated value? And if so, what happens if this is, say 999?
Since the contents of a warning are shown if the dates are ‘wrong’, i.e. the departure date
is BEFORE the arrival date, I’ve difficulties with defining the proper default value of this calculation field.
I don't understand your concern, the forms calculation is working as expected. The fact that the Form Calculation field has a default value does not affect your form's conditional logic.
If you want to remove a default value, simply click on the gear icon, click on "edit properties", look for "Default Result" and leave it empty:
Considering that your last question is not related to subject of this thread, I have moved it to separate thread and we will provide you an answer there shortly.