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.
Disabling users to enter blacked out dates (custom calendar)Asked by rlzolinas on June 30, 2015 at 08:57 AM
I received a request to disable users to enter dates that are not included on the calendar. Currently they can alter the dates in the text box even if they are blacked out on the calendar. This is a custom form: http://www.duq.edu/admissions-and-aid/undergraduate-admissions/schedule-a-visit/personal-campus-visits/weekday-visits Any suggestions would be helpful! Making the field read-only didn't seem to work.
I think you mean the "Desired Visit Date". If yes, then just simply add the following script in the form source codes:
document.getElementById("input_8").disabled = true;
Add this below the closing script tag of the form. This line, see screenshot:
Perfect! Thank you so much!
After testing this, the desired visit date disappears in the notifications. While I need this field to be read-only, I still need this to show up in the notifications.
The script should only disable the field and should still accept a data based on the other script you have. Can you restore it so I can try it?
If not, then please do the following.
Find the following line, this is the field input HTML line:
<input class="form-textbox validate[required]" id="input_8" name="q8_desiredVisit" size="20" type="text" value="" data-type="input-textbox">
Replace it with the following:
<input type="text" readonly="readonly" tabindex="-1" class="form-readonly form-textbox validate[required] form-validation-error" data-type="input-textbox" id="input_8" name="q8_desiredVisit" size="20" value="">
I hope this works. If not, please get back to us so we can check further.
This seemed to do the trick! Thanks again!
That's great to know :)
Please contact us again if we can help in any way.