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.


  • Profile Image

    Disabling users to enter blacked out dates (custom calendar)

    Asked by rlzolinas on June 30, 2015 at 08: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!

    Page URL:
    http://www.duq.edu/admissions-and-aid/undergraduate-admissions/schedul<br/>e-a-visit/personal-campus-visits/weekday-visits

    custom calendar www read-only
  • Profile Image
    JotForm Support

    Answered by Welvin 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

  • Profile Image

    Answered by rlzolinas on June 30, 2015 at 11:52 AM

    Perfect! Thank you so much!

  • Profile Image

    Answered by rlzolinas 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.

  • Profile Image
    JotForm Support

    Answered by Welvin 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.

    Thanks

  • Profile Image

    Answered by rlzolinas on June 30, 2015 at 02:39 PM

    This seemed to do the trick! Thanks again!

  • Profile Image
    JotForm Support

    Answered by Welvin on June 30, 2015 at 03:00 PM

    That's great to know :) 

    Please contact us again if we can help in any way.

    Thanks