- duqadminAsked 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.
- JotForm SupportWelvinAnswered on June 30, 2015 at 11:48 AM
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:
- duqadminAnswered on June 30, 2015 at 11:52 AM
Perfect! Thank you so much!
- duqadminAnswered on June 30, 2015 at 02:04 PM
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.
- JotForm SupportWelvinAnswered on June 30, 2015 at 02:13 PM
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.
- duqadminAnswered on June 30, 2015 at 02:39 PM
This seemed to do the trick! Thanks again!
- JotForm SupportWelvinAnswered on June 30, 2015 at 03:00 PM
That's great to know :)
Please contact us again if we can help in any way.