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

    how to add date format

    Asked by felipe_sasa on January 11, 2012 at 09:53 PM

    currently the available options for birth date picker format is mm,dd,year: dd,mm,year..what about adding a third option which is mm,yearr only or year,mm. thanks in advance.

    date format hide year hide day hide elements hide parts hide sections
  • Profile Image
    JotForm Support

    Answered by abajan on January 11, 2012 at 10:54 PM

    Thanks for the suggestion. It will be forwarded it to our Tier 2 team for their consideration. In the meantime, injected CSS can be used to hide the "Day" section:

    #cid_1 span + span {
    display: none;
    }

    #cid_1 span + span + span {
    display: inline-block;
    }

    The ID in each selector (highlighted in red above) would need to match that of the birthday picker being targeted.

    You can see the above CSS in action in this example form. Unfortunately, this doesn't work in IE6 but thankfully, the number of users of that browser continues to dwindle.

  • Profile Image

    Answered by felipe_sasa on January 12, 2012 at 09:44 PM

    thanks for the quick response sir abajan...i injected the code as detailed and it actually works...very helpful

  • Profile Image
    JotForm Support

    Answered by abajan on January 12, 2012 at 09:46 PM

    Glad to help.

    Cheers

  • Profile Image

    Answered by felipe_sasa on January 12, 2012 at 10:28 PM

    Sir Abajan...another thing. it seems that hiding the day using the code only works for one birthday picker...my problem is i'm using a lot of it in single form..is there a way i can apply it to multiple birthday picker and disable it to to some other birhtday picker in a single form..if not possible for this time, its ok..but if there's a work around i appreciate it a lot...thanks a lot sir.

  • Profile Image
    JotForm Support

    Answered by abajan on January 12, 2012 at 11:46 PM

    Yes this can be done but because of the current limitations of CSS, you would have to embed the full source of the form into a web page and assign a class to all of the "Day" elements (except the one that is to be shown) as can be seen in the source of this page. (A class named hide was used to hide the "Day" elements, as per the comment. If you search the source for "hide" you will see it included in the tag that spans each "Day" element but the last.)

    If you don't want to go the route of embedding the full source, you would have to use seperate sets of rules for each birth date picker, targeting each one via its ID, as explained in my first reply. Of course, no rules would be used for the birth date picker that is to show the day. (See this clone of the above form that uses this alternative solution. If you clone this second form to your account and view its injected CSS, you will see a pair of rules for each "Day" element that has been hidden: 6 rules in total.)

    If you need clarification on anything, please let us know.

    Incidentally, the ticket requesting that the option to exclude the "Day" from birth date pickers be included in the form builder has been submitted but I can't give a date certain as to if or when the feature will be implemented. However, should it become a reality, there would be no need to use either of the above solutions.

  • Profile Image

    Answered by bhpinfo on November 15, 2012 at 06:49 AM

    Hi abajan,


    Based on the advice above I was trying to work out how to hide the year field, but can't seem to be able to get it right.


    Could you let me know what the css is to hide the year field and leave day and month only?

    Kind regards,


    Kasia

  • Profile Image
    JotForm Support

    Answered by Welvin on November 15, 2012 at 09:14 AM

    Hi Kasia,

    May we know the form URL so that we could directly give you the right CSS codes to hide the year item on date field?

    Thanks

  • Profile Image
    JotForm Support

    Answered by abajan on November 15, 2012 at 09:31 AM

    Hi Kasia

    To hide the year field, inject just the following rule, substituting the your field's ID for cid_1:

    #cid_1 span + span + span {
    display: none;
    }

    If you need further assistance with this, please let us know.


    Wayne

  • Profile Image

    Answered by bhpinfo on November 15, 2012 at 09:31 AM

    Hi Welvin,

    Here it is: http://form.jotformpro.com/form/23025230085946.

    Thanks for your help.

    Kasia

  • Profile Image

    Answered by bhpinfo on November 15, 2012 at 09:37 AM

    Hi abajan,

    That worked, but there is still the / remaining at the end?

    Kasia

  • Profile Image
    JotForm Support

    Answered by abajan on November 15, 2012 at 09:46 AM

    Hi again Kasia

    Please replace the rule you recently injected with the following:

    #cid_20 span + span + span,
    #cid_20 span + span .date-separate {
    display: none;
    }

    If you would like further assistance with this or any other JotForm matter, we'd be happy to help.


    Wayne

  • Profile Image

    Answered by bhpinfo on November 15, 2012 at 09:56 AM

    Fantastic Wayne, thank you very much.

    Your support is amazing!

    Kasia

  • Profile Image
    JotForm Support

    Answered by Welvin on November 15, 2012 at 10:25 AM

    You are welcome, Kasia. Thank you for such great feedback. BTW, Wayne was legendary. :)

  • Profile Image

    Answered by contadoria_PJF on June 05, 2013 at 04:45 PM

    Mr. Wayne,

    My english is not good, sorry!

    Please, where I paste de CSS code to hide year? I paste in preferences and it don´t apear in field details!

    Thank's so much!

    Ed

  • Profile Image

    Answered by pinoytech on June 05, 2013 at 04:51 PM

    Hi Ed,

    Please take a look at this article for more detailed information.

    http://www.jotform.me/help/117-How-to-Inject-Custom-CSS-Codes

    If you need further assistance, do let us know.

    Thank you!

  • Profile Image

    Answered by contadoria_PJF on June 05, 2013 at 05:19 PM

    Hi again,

    I past de CSS code as showed. I closed configurations and nothing change :( Is it my CSS code to hide year correct? My language is portuguese

  • Profile Image
    JotForm Support

    Answered by Mike_T on June 05, 2013 at 05:58 PM

    @Contadoria_PJF,

    In your case the correct ID is cid_19.

    So the code that you can try is:

    #cid_19 span + span + span,
    #cid_19 span + span .date-separate {
    display: none;
    }

    Please feel free to contact us if you need any further assistance.

  • Profile Image

    Answered by contadoria_PJF on June 05, 2013 at 09:40 PM

    Hello!

    The suport answer me by email.

    The code to hide year in my case is:

    #input_19_year 

    {

    display:none !important;

    }

    #sublabel_year 

    {

    display:none !important;

    }


    Perfect! Your suport was amazing!

    Thanks a lot!

    Best regards from Brasil!

    Ed

  • Profile Image
    JotForm Support

    Answered by abajan on June 05, 2013 at 10:27 PM

    On behalf of my colleagues, you're quite welcome.

    Best Regards from Barbados :)


    Wayne

  • Profile Image

    Answered by contadoria_PJF on June 06, 2013 at 04:01 PM
    Hello again!
    The year field is hidden, but it continues as required.
    Take a look at my form here : http://form.jotformpro.com/form/31556756631964
    ?
    Thanks.
    Ed
    2013/6/5 JotForm Support Forum
  • Profile Image
    JotForm Support

    Answered by Mike_T on June 06, 2013 at 04:39 PM

    Unfortunately, there is no way to remove the validation from the year field only through the builder. It might be possible with the form source code through. If you would like to use the form source, you can create a new thread, and we will try to find some solution.

    Another work around is to remove the Required validation from the entire data field.

    Thank you.