-
duqadminAsked on June 30, 2015 at 8:57 AM
Hi,
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.
Thanks!
-
Welvin Support Team LeadReplied 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:
<script type="text/javascript">
document.getElementById("input_8").disabled = true;
</script>
Add this below the closing script tag of the form. This line, see screenshot:
Thanks
-
duqadminReplied on June 30, 2015 at 11:52 AM
Perfect! Thank you so much!
-
duqadminReplied on June 30, 2015 at 2: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.
-
Welvin Support Team LeadReplied on June 30, 2015 at 2: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.
Thanks
-
duqadminReplied on June 30, 2015 at 2:39 PM
This seemed to do the trick! Thanks again!
-
Welvin Support Team LeadReplied on June 30, 2015 at 3:00 PM
That's great to know :)
Please contact us again if we can help in any way.
Thanks