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

    Can the Read-only function be enabled for the Date/Time fields?

    Asked by NRCsupport on March 02, 2014 at 10:41 AM

    I'd like to have a field on the form which is automatically set to the current date and can't be altered by the user. If the user susequently edits the form, I'd like that field to be updated automatically on the resubmission.

    The first part can obviously be achieved by having a date/time field defaulting to the current date and set to read only. But how can I get it updated on resubmission?

    Updated time field read only and
  • Profile Image

    Answered by Cesar on March 02, 2014 at 12:10 PM

    From my understanding, you are tryin to create a timestamp, is that correct? 

    You could also use the widget DateTime Single and set this field to visibility:hidden so that it is not tampered with.

    Here is my example form using the DateTime Single widget.

    http://form.jotformpro.com/form/40604969494971?

    https://shots.jotform.com/cesar/screens/DateTimeSingleWidget.png

    Kindly clone my form so that you may further review it. It is set to provide an edit link on the Thank You page after a submission.

    After editing the original submission the date time should also update automatically on the widget.

    Do let us know if you need further support. Thank you.

     

  • Profile Image

    Answered by NRCsupport on March 02, 2014 at 01:47 PM

    Thanks. That seems to be the normal date/time field and does not update when I resubmit.

    If I use the right one, I'd like it to be made read only. I don't think this option exists - at least I cant find it.

    I would like to use the {edit_link} in my thank you page (as you have shown here). Unfortunately I need to use an external thankyou page because I need it to be back in my website, so that my navigation buttons are available for the user to "escape" from the thankyou page. I've alredy had a discussion about this. Since the edit link contains ? and & characters it presumably can't be placed in the URL string

  • Profile Image
    JotForm Support

    Answered by BDAVID on March 02, 2014 at 04:12 PM

    Hi, did you tried the date time single widget?  It will update the time when the form is reopen to be edited. You can add the edit link in your form´s autoresponder, so when the email confirmation gets to the submitters, they will see the link to edit your form.

  • Profile Image

    Answered by NRCsupport on March 02, 2014 at 04:48 PM

    Thanks, yes I did try the date time single widget, and it did update on editing the submissions. The problem is that I would like the date to be visible and read only. There does not appear to be any way to make either date time readonly.

    What I am trying to achieve is the following. I have a check box which needs to be checked by the user to confirm that the informtion given iscorrect. This is followed by a date field which is supposed to give the date that the confimation was clicked. At present this field is a text box and the user can enter anything they like. I would like the current date (and possibly time) to be displayed automatically at the time that the check is clicked. On subsequent resubmissions if the check is already there, the date should remain as it was. But if the check was not originally there, but is added in the current edit session, then the the date/time should be set at that point. I don't expect this is possible.

    With regard to edit_link, I know that I can use it in the emails, and have alredy done so, but I would like to include in my external thank you page as well, so that the user can do an immediate edit if necessary. If they are not working on their own computer they might not get immediate access to their emails.

  • Profile Image
    JotForm Support

    Answered by ashwin_d on March 02, 2014 at 09:59 PM

    Hello NRCsupport,

    Unfortunately, we do not have such feature but it is possible to send edit_link to any external thank you page. Now the question will be that how your external thank you page will read the information which will be sent from our server. You will have to use custom server side scripting code to read this data in your thank you page. The following guide should help you achieve your requirement:  http://www.jotform.com/help/213-Send-POST-Data-From-JotForm-Using-PHP-in-Custom-Thank-You-Page

    Hope this helps.

    Do get back to us if you have any question.

    Thank you!

  • Profile Image

    Answered by NRCsupport on March 03, 2014 at 11:08 AM

    Hello, I've taken another look at your example form, and I've cloned it and played around a bit. But I am very puzzled. You seem to have a field called {01} which contains a "single date" entry with date but no time. I cannot find the field anywhere on the form, but it shows up in the email. How did you create this field? and why can't I see it in the editor?

  • Profile Image

    Answered by EliezerN on March 03, 2014 at 11:52 AM

    Hi,

    The field you are talking about is our Date Time Single widget, it is not shown in the form because it has been hidden using CSS code:

    As my colleagues have stated before, we do not have such feature that allows you to show the date/time field with read-only function. We alaredy a Read-only function, but it does not work with the date/time fields, it works with these fields only: 

    Email

    Full Name

    Number

    Phone

    Text Box

    Text Area

    So, I have submitted a feature request so that the Date/Time fields can bee included in that list.

    We will inform you via this thread if this implementation is performed.

    Thanks

  • Profile Image

    Answered by NRCsupport on March 03, 2014 at 01:11 PM

    Thanks, ... and how have you made it only pass the date part to the thankyou page?

  • Profile Image
    JotForm Support

    Answered by TitusN on March 03, 2014 at 03:09 PM

    Hello,

    You can strip the PHP tags using the name attributes for each input type field, for example:

    {date:month}/{date:day}/{date:year}

    Outputs this:

    Hope that helps.

  • Profile Image

    Answered by NRCsupport on March 03, 2014 at 04:08 PM

    I must be very thick. I can't find where that has actually been done in your example that I cloned.

  • Profile Image
    JotForm Support

    Answered by TitusN on March 03, 2014 at 04:15 PM

    Oh, no, you are not thick at all. 

    I'm only demostrating how you can pass part of a field's values to the custom thank you message.

    In my above example, the date-time field can be stripped of the time result on the thank you page by editing the tag as shown - this tells PHP to pass the indicated values only.

    Here's the form I worked on as a demo: http://jotformpro.com/form/40610820956957

    Sorry I did not provide it ealier.

    The initial request has been submitted to development.

  • Profile Image

    Answered by NRCsupport on March 03, 2014 at 04:50 PM

    Thanks. But could you have a look at http://form.jotformpro.com/form/40616366253958

    This was based on the demp I was sent earlier in this thread. I've done various things to it. There are now two single-date fields in it as well as a normal date. If you look at the thankyou page, one of these appears as date only and one as date/time, but there is nothing in the setup that cuts off the time, so do you know how that was done?

  • Profile Image
    JotForm Support

    Answered by TitusN on March 03, 2014 at 05:14 PM

    That looks like a lone of the demo I just made.

    Perhaps you meant to provide a different link to another form?

    Let us know.

  • Profile Image

    Answered by NRCsupport on March 03, 2014 at 05:30 PM

    http://form.jotformpro.com/form/40605576057961

    Sorry I think this is the correct url

  • Profile Image
    JotForm Support

    Answered by TitusN on March 03, 2014 at 06:05 PM

    Thank you for that.

    I can certanly see what you mean - but only in firefox - it looks like a browser - related bug - I would not bank on that as a feature - it might need looking into:

    In the meantime, the only sure way of programatically calling outputs is the method I demonstrated.

  • Profile Image

    Answered by NRCsupport on March 03, 2014 at 06:12 PM

    Thanks.

    Very peculiar isn't it. The first line is from field {01} which was in the original demo and the third line is from my inserted field.

  • Profile Image
    JotForm Support

    Answered by TitusN on March 03, 2014 at 06:31 PM

    It certainly is.

    But you will find if you try various tags - they might return a value - depends on the PHP code behind the page.

    In any case - This ticket has been earmarked for a feature request to include the date-time field in the 'hide-field' Feature bracket.

    Please open a new thread - let us know what you are trying to implement, and we shall throw some Ideas your way.

    BTW thank you for assisting some of our users - its much appreciated.

  • Profile Image

    Answered by NRCsupport on March 10, 2014 at 07:00 AM

    Many thanks. I can now make the date/time field read only. Just what I wanted.

    The date/time single widget does fulfil my need to have a date field that is set when the form is opened and is updated  when reopened for editing. The only problems are that I cant get both date/time fields to appear in the same format and I can't remove the time from date/time single widget. I think I already have a thread open on that subject. I'll look for it.