- NRCsupportAsked on November 05, 2015 at 11:50 AM
I have two questions about the date/time single widget. I'll put them in separate threads.
The first question is when exactly is the field filled with current date/time? I get the impression that it occurs the frst time that the field is made visible. I believe this to be the case because if I place my date/time single field in part of the form which is never displayed (e.g. after a pagebreak at the end of the visible form) it seems to remain empty and is therefore not listed in the emails.
- CharlieAnswered on November 05, 2015 at 02:17 PM
I presume you are referring this widget in your form
You can hide it by adding this custom CSS code in your Form Designer Tool:
display : none !important;
The widget then will be hidden, but will continue to have the value. However, please note that the date and time that will populate on that widget will be the date and time to when the form is first viewed or when it first loaded. Here's the email notification I received in my test form:
I hope that helps.
- NRCsupportAnswered on November 06, 2015 at 07:39 PM
Thanks. Please can you tell me how to get to the screen that occurs just below
"Disply:none !important;" in your reply above. I don't think I've ever seen it.
By the way I was not enquiring about how to hide the date/time single widget, but about at what point in time does the widget get filled. As I said at the start of the thread, it appears that if the widget is located in part of the form that is never displayed, the widget does not get filled. So I believe that it gets filled when the page it is on first becomes visible. I imagine (and hope) that this is not over ridden by css code such as you show.
I have just checked and confirmed that the date/time widget does not get filled until its page is displayed. I called up the form and waited for 5 minutes before advancing to the page containing the widget. The widget got populated with the date/time at which the page opened, and NOT the date/time at which the form opened.
- JotForm SupportMike_GAnswered on November 07, 2015 at 05:28 AM
display : none !important;
are custom CSS codes used to make the field with id equal to "id_172" hidden.
I understand that the widget is on the last page of your form: http://www.jotformpro.com/form/40503979576971
I have cloned your form and removed all the required field warning in all fields that have it and I've also added a submit button on the first page of the form.
I have tried to submit the form as soon as it loaded and didn't go to the page where the Date/Time Single widget.
Here's what I got:
But when the page where it has the widget is loaded before submission, the widget is filled with a value.
The information I have posted above confirms your findings that if the page were the widget resides is not loaded the widget is just empty until that page loads.
I believe that's how that widget really behaves. And you are correct it will be included in the email but will remain as blank or empty.
Also, on the information I have above, notice that the normal Date field(Date first submitted) has its value even if the page where it resides is not loaded. How would you like to use that instead? You can also include a Time field on the Date field by:
I hope this helps. Let us know if you have any further questions. Thank you.
- NRCsupportAnswered on November 07, 2015 at 06:49 AM
Thanks.I still don't understand how to get to the screen that occurs in your previous reply just below
"Display:none !important;". I mean the screen where you have marked "3. Click to save the changes" and "2. Paste custom CSS code here". I have never come across a screen like that when working on my forms.
With regards to using the normal date/time field. (1) It is not suitable for the date/time of this submission, because it does not update on resubmissions. (2) It does not seem to be possible to both the normal date/time widget and the date/time single widget to display the full date and time in the same format.
- JotForm SupportabajanAnswered on November 07, 2015 at 09:47 AM
The question about the unfamiliar screen has been moved to another thread (http://www.jotform.com/answers/699938) and has been addressed there.
As to the differences in functionality between the default date/time tool and the DateTime Single widget, let me run some tests and get back to you as soon as I can.
- NRCsupportAnswered on November 07, 2015 at 11:41 AM
I'll look at the other thread.
By the way I am using the two types of date/time tool as suggested to me on this forum a long time ago. The normal one to give a result on firt submission which remains set on all eidts, and the "single" one to give a date/time stamp each time a new edit is made and submitted.
I have now started using your suggestion of using css code to hide the date/time single widget. This works very nicely BUT it has the odd effect that the field becomes totally invisible in the form builder and form designer. So in order to make any other changes to the field properties, etc, one has to remove the css code first.
- JotForm SupportMike_GAnswered on November 07, 2015 at 01:59 PM
I was able to see what you mean on edit mode.
Here's what you can do:
Instead of using the DateTime Single widget on the last page of the form, use a normal Textbox. And pass the value of the DateTime Single widget on the first page of the form.
So even if you didn't go to the last page of the form the value of the textbox will still change since it will get the value of the DateTime Single widget on the first page of the form that will always load an updated date and time for sure when the form loads.
If you will check the form I have given you on this thread: http://www.jotform.com/answers/698505-Can-a-form-tell-if-it-is-original-data-entry-mode-or-edit-mode
I have added a DateTime Single widget on that form on the first page to trigger the on load condition. You can still use that same DateTime Single widget to populate the text box field on the last page. You can also set the textbox field to "read-only" so it cannot be updated even on edit mode.
Now, to test if it works, I have again removed all the required field warning to allow me to submit even if I have not completed the form and still on the first page. So, after making a submission on the first page without going to the page where the Date/Time fields at, here's what I got.
And when you edit the submission and re-submit.
I believe if your purpose is to just get the date/time in a text (like a timestamp), using a textbox would be just as good as the DateTime Single widget located on the last page of the form. Since you will have the same result.
I hope this helps. Should you have any other questions or concern, please feel free to contact us anytime. Thank you.
- JotForm SupportMike_GAnswered on November 07, 2015 at 02:06 PM
By the way, just to add:
The DateTime Single widget on the first page of the form is hidden using this CSS codes:
display: none !important;