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

    Is it possible to stop the DateTime Single Widget from opening when it is clicked on?

    Asked by NRCsupport on November 02, 2015 at 03:00 PM
    2. Can I stop the picker from opening when I click in the field? Presumably this would be solved by implementing the next item.
  • Profile Image
    JotForm Support

    Answered by KadeJM on November 02, 2015 at 03:14 PM

    To my knowledge you would like to find a way to prevent the DateTime Single Widget "Picker" from "Opening" when the field is clicked on which spawned this initial request for a read only option.

    I've taken a little bit of time to attempt some tricks to see if I could find a quick workaround for this for the time being but so far I am unable to disable it.

    However, I believe the script that is running the widget is likely overriding the attempts I am making which means the only way I think this might be possible would be to modify it outside of jotform in the form's full source code. But, I also believe that upon doing so it would likely break the functionality and you therefore might not receive the data so it is not something that I would recommend or guarantee though it doesn't hurt to at least try.

    I'll need a bit more time but will attempt to see if there is another way to make it work for you and if there is i'll let you know as soon as I can in another followup response. Perhaps my colleagues might have some better ideas too.

  • Profile Image

    Answered by NRCsupport on November 02, 2015 at 04:53 PM

    Thanks.

    Basically what I want is a field that can be set automatically to the current date when the form is opened for data entry or for edit. The user should not be able to alter the field.

    I was advised some time ago that the datetime single widget was the best way to get the first part of this (i.e. set on opening for data entry or edit) - but unfortunately it does not allow it to be set to readonly

  • Profile Image

    Answered by Jack  on November 02, 2015 at 06:33 PM

    Hi.

    I just ran the scenario in my head. Maybe if a Form Calculation is used to get the value of the DateTime Single and clicking the DateTime field once to make it text-based (will turn from orange field to black).

    Then add a {display:none;} css script to hide the DateTime field. Which will only show the Form Calculation field with the current date & time as read-only in the live form.

  • Profile Image

    Answered by Jack  on November 02, 2015 at 06:45 PM

    It worked. I just tried it with the custom css:
    #cal {display:none;}

  • Profile Image

    Answered by NRCsupport on November 04, 2015 at 06:38 PM

    Please see my other thread "Can a Read-Only Option be added to the DateTime Single Widget?" . The suggestion in that thread would be simpler, apart from the problem I mention at the end of the thread.

    But I do not understand "I just ran the scenario in my head. Maybe if a Form Calculation is used to get the value of the DateTime Single and clicking the DateTime field once to make it text-based (will turn from orange field to black)" in your answer.

    I could not get the field colour to change by clicking on it. However I found an option to convert fields to text in the advanced options for the widget.

  • Profile Image
    JotForm Support

    Answered by Chriistian on November 05, 2015 at 01:58 AM

    Hi,

     

    Your other thread -  http://www.jotform.com/answers/340807-Can-the-Read-only-function-be-enabled-for-the-Date-Time-fields,  have been answered by my colleague Beril. What Jack was stating is just a scenario he thought might happen. 

    I'm glad you have found a way to get achieve your requirement.

     

    Do let us know if you need further assistance.

    Regards.

     

  • Profile Image

    Answered by NRCsupport on November 05, 2015 at 11:42 AM

    Thankyou. Please can you tell me what is meant by "clicking the DateTime field once to make it text-based (will turn from orange field to black)". This did not work for me. Does this mean that JotForm isnot working properly for me?

  • Profile Image
    JotForm Support

    Answered by david on November 05, 2015 at 01:43 PM

    He was referring to the "Add field to equation as text by default" option in the calculation:

    When the option is not enabled, fields are added orange, when the option is selected, the field is added as grey, to show that it is added as text.