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

    Customise date formats

    Asked by vaidm on February 19, 2014 at 01:39 AM

    Hi there,

    Is there an option to have dates in mm/yyyy format?

    format
  • Profile Image
    JotForm Support

    Answered by EltonCris on February 19, 2014 at 03:27 AM

    Hi,

    You can use DateTime tool under Quick Tools and then hide the day field, will this help?

    You can also use the following widget.

    http://widgets.jotform.com/widget/localize_calendar, just select the mm/yy format so it outputs e.g. 02/2014

    Example: http://widgets.jotform.io/localize_calendar/?format=MM%20yy

    Thanks!

  • Profile Image

    Answered by vaidm on February 19, 2014 at 03:31 AM

    Hi Elton,

    Thanks for the quick response.

    I tried using the Date Time tool, but it just seems out of place with the rest of the form (in terms of the customisation). I'm looking for something that displays "February 2014".

    Cheers.

  • Profile Image
    JotForm Support

    Answered by NeilVicente on February 19, 2014 at 04:27 AM

    @vaidm

    An alternative would be the Birth Date Picker control found under the Quick Tools section. You can just use custom CSS to hide the day field, and the output would be the same as what you desire.

    Users can choose dates in mmyyyy format, but the words will be in month.

     

    If this solution fits your needs, let us know so we can give you directions on how to hide the Day field.

  • Profile Image

    Answered by vaidm on February 19, 2014 at 06:46 AM

    Hi Neil.

    I guess the birth date picker tool fits in perfectly. Could you share the CSS that needs to be applied to hide the day and display the date in words - e.g. January 2014?

    Thanks

  • Profile Image
    JotForm Support

    Answered by BDAVID on February 19, 2014 at 09:36 AM

    First thing you need to do, is to open your form in your browser, then you will need to right click to inspect the element, and get the ID of the day, which in this case is: #input_8_day

    You need to inject the following CSS code to your form:

    #input_8_day {

    display: none;

    }

    #sublabel_day {

    display: none;

    }

    This will be the result:

    Let us know if you need more help.

  • Profile Image

    Answered by vaidm on February 19, 2014 at 05:49 PM

    Hi there,

    Thanks for the response. That worked, but then the day fields in other places has lost its alignment. See the attached image. I've used the date/time tool there

  • Profile Image

    Answered by pinoytech on February 19, 2014 at 06:31 PM

    @vaidm

    Unfortunately, we don't see any attached image in your response. Can you please post it again and include URL of your Form for further assistance?

    Thanks,

  • Profile Image

    Answered by vaidm on February 19, 2014 at 06:49 PM

    Unfortunately, the site is a staff only restricted site...and can't paste images in this text editor. For some reason, other support staff was able to view my form and even clone it from my account. Is that something you would be able to do?

  • Profile Image

    Answered by pinoytech on February 19, 2014 at 07:26 PM

    I've took a look at your account, but I couldn't find any form in it. Can you please share to us URL of your Form so we can provide you the exact custom css to fix the issue of day field and for further assistance?

    Thanks,

  • Profile Image

    Answered by vaidm on February 19, 2014 at 07:29 PM

    http://form.jotformpro.com/form/40477239803963

  • Profile Image

    Answered by vaidm on February 19, 2014 at 07:31 PM

    All the other dates have the 'day' field aligned slightly towards the bottom, except the in-market date where I used the custom CSS injection and birth date picker tool. Other date formats are using the regular date/time tool.

  • Profile Image

    Answered by vaidm on February 19, 2014 at 08:12 PM

    The other issue that I've discovered is in the email notification. Even though the 'day' field is hidden with a custom CSS, the 'day' does appear in the email notification. See the in-market date below (for which the custom CSS is applied)

    DISTRIBUTION CRITERIA (TARGET AUDIENCE)

    Who would you like to send this email to?

    Country of residence
    In-market date

    Country of residence

    AU / NZ

    Country of citizenship

    Student type

    Record created

    All records that fit distribution criteria

    All records created between

     

    In-market date

    February 2 2013

     State(s) selected

    Undergraduate degree of interest

    Graduate school of interest

    Exclude clients with applicatons

    Yes

  • Profile Image

    Answered by Cesar on February 19, 2014 at 09:09 PM

    Try using the following code on your Email Notification instead:

    {inmarketDate159:month} {inmarketDate159:year}

    Where the {inmarketDate159} is the name of the field and :month, :year are the Ids used on that field.

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

  • Profile Image

    Answered by vaidm on February 19, 2014 at 09:16 PM

    Sorry Cesar...didn't work!

    I've also highlighted another issue in my previous post about the day being displayed, even if the CSS hides it.

  • Profile Image

    Answered by Cesar on February 19, 2014 at 10:15 PM

    I do see you have In Market values on multiple sections of your Email Alert. So I may have missed the bottom one DISTRIBUTION CRITERIA (TARGET AUDIENCE) which is the one on the text you posted above. For that section, it appears the field is only {inmarketDate}. If possible, kindly try the following custom form fields: {inmarketDate:month} {inmarketDate:year}

    Do let us if the issue persists. Thank you.

  • Profile Image

    Answered by vaidm on February 20, 2014 at 08:58 PM

    Hi Cesar,

    Not sure what you mean by "custom form fields: {inmarketDate:month} {inmarketDate:year}"? Is this the CSS injection?

    Thanks

  • Profile Image

    Answered by vaidm on February 20, 2014 at 09:11 PM

    Also, for the month, I only want Feb and July.

  • Profile Image

    Answered by Cesar on February 20, 2014 at 10:12 PM

    You would need to add these fields on the Email Notification. So that the values month and year are extracted from their original field and displayed on your Email Notification.

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

    Let us know if you need further clarification. Thank you.

  • Profile Image

    Answered by vaidm on February 20, 2014 at 11:09 PM

    Brilliant, that worked :) Thanks Cesar!

    One last thing, for the in-market date, with the CSS injection applied and if the field is mandatory, then it requires the 'day' field to be filled in, even though that's hidden. Not sure how to fix that. If the field is not mandatory, then no issues.

    Also, can the month field display only February and July?

  • Profile Image
    JotForm Support

    Answered by ashwin_d on February 21, 2014 at 12:39 AM

    Hello vaidm,

    Unfortunately, it is not possible to remove the validation form the day field only through the form editor. You will have to download your form's source code and remove the validation code manually. 

    Alternatively, you can just mark this particular date field as not required.

    Thank you!

  • Profile Image

    Answered by vaidm on February 21, 2014 at 12:46 AM

    Thanks Ashwin!

    I've made that field non-mandatory for now.

    Could you please help me with the following:

    a. I need to set the in-market date to display only February and July in the month's drop down list

    b. Also, all other date fields have gone wonky, the 'day' field in particular, across the entire form. This is because of the CSS injection applied on the in-market date field, but not sure why it's impacting other date fields.

    Thanks.

  • Profile Image
    JotForm Support

    Answered by EltonCris on February 21, 2014 at 02:05 AM

    @vaidm

    Thanks and glad to hear your first question was resolved. For your other questions, may we request you to post it on a separate thread so we can assist you better without jumping to a different issues on this thread.

    Thank you for your understanding. Regards!