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.
Changing format of the date field to text stringAsked by celsol on April 07, 2015 at 11:53 AM
I have an issue with the date widget
currently the variable is returned in format DD-MM-YYYY (09-04-2015)
Ideally I need to return DD MMM YYYY (09 Apr 2015).
I am not too bothered how it is displayed on the form just need that format on the notification as it will be used as the subject line for the notification email.
I have seen something done on this page which come close: http://form.jotformpro.com/form/50884356788978?
However am not sure how to implement, I am using the embed script and would prefer not to use raw HTML.
Any advice would be appreciated.
If you would like to output the date field just like the one shown in the sample form, you can follow the steps below.
1. First, add the default date field in your form, in your case I assume you already have one. Add the "Form Calculation" widget and click the wizard icon to set it up.
2. Inside the form calculation widget, use the dateString() function and add the date field inside it. This will convert the date field to a text format.
3. Here's the list where you can find the dateString() function.
4. Make sure to save the changes. After that, you can click the notification in your "Emails" setting.
5. Inside the email notification, add the form field tag for the form calculation widget anywhere in your email. In this case I added it on the subject line.
5. I made a test submission and this is who it will looked like in my email inbox.
I hope that helps.
Can we format the calculated date.. i.e like dd-mmm-yy
now, the output is showing day mmm dd yyyy format.
we are trying to send the notification to some other system with due date in the subject. The other system is allowing to set due date in dd-mmm-yyyy format only.
To better assist you, I went ahead and opened a separate thread for us to discuss the concern you have. Please refer to this link instead: http://www.jotform.com/answers/709905. We will address it accordingly.