I am trying to create a form field line for expiration date.

  • Profile Image
    Asked on September 30, 2011 at 03:06 PM

    I am creating a form that will require the user enter credit card information. The form does not need to process the card; we have someone to do that offline after she downloads the form submissions.

    I need to create a form field similar to the date included next to the "birthday" form row, but I can't figure out how to take out day so it only asks for month/year.

    Any ideas how best to do this?

    Thank you!

  • Profile Image
    Answered on September 30, 2011 at 06:54 PM

    JotForm Admin Will Help You Soon Sorry For The Delay!

    Thank You For Using JotForm

    (Im just a forum helper!) 

    -Y H

  • Profile Image
    Answered on October 01, 2011 at 12:05 AM

    Hi racteam

    Thanks for asking. Injected CSS can be used to hide the "Day" section (or any part) of a date field. Clone the form below and have a look at its injected CSS:

    (Right-click image and copy link address to URL box in New Form Wizard)

    For your own forms, inject the same rule and replace each instance of "5" with the correct number. And how will you know what number to use? You can search the form's source for the date field from which you wish to remove the "Day". (Tip: Search for the label of the field.) You will see the same number associated with every element of that field. Use that number:

    #cid_5 .form-sub-label-container {

    #input_5_year {

    label[for="input_5_day"] {

    Instead of searching the form's source, you might find it easier to use Firebug or other browser developer tools.

    If you need further help with this or any other aspect of our product, please let us know. Our team will be happy to help you.


    ~ Wayne

  • Profile Image
    Answered on April 10, 2016 at 11:38 PM

    i just tried the steps above and the day still shows ups.  Can you help me with what I am doing wrong?
  • Profile Image
    Answered on April 11, 2016 at 02:04 AM

    Hello jataya,

    I have moved your question to a new thread and you will be answered here:  https://www.jotform.com/answers/815050 

    Thank you!