Custom CSS Birthdate Widget

  • nmartunas
    Asked on June 17, 2021 at 8:39 AM

    I'm trying to use the birthdate widget to just ask for Monday and Day, and not ask for year. I added CSS and the year field is no longer there however the label for year is still there.


    I've attached a screenshot.


    here is the CSS I'm using


    #input_6_year{

       display: none;

    }

    #sublabel_year{

       display: none;

    }


    Thanks,

    Nick


    Jotform Thread 3166569 Screenshot
  • Cecile JotForm Support
    Replied on June 17, 2021 at 12:03 PM

    Hello Nick,

    Kindly add #sublabel_6_year in your custom CSS. See screenshot below.

    1623945579 60cb716b3301f 9 Screenshot 10

    Note: Since all selectors have the same CSS, you may format your code like this:

    #input_6_year,#sublabel_year,#sublabel_6_year{

      display: none;

    }

    Result:

    1623945613 60cb718d43537 10 Screenshot 21

    Let us know if you need further assistance.

    Thank you.

  • nmartunas
    Replied on June 17, 2021 at 3:16 PM

    This worked - thank you - the PDF that is generated after however is showing a year of 2021, is there a way to hide it on the PDF?

  • Cecile JotForm Support
    Replied on June 17, 2021 at 6:40 PM

    Unfortunately, we cannot hide the year in PDF. I also tried copying the value of Birth Date widget to a short text field but failed in doing so as the value cannot be copied if the year's not filled. You might consider using two Dropdown fields to get Birth Month and Day instead.

    Should you have further inquiries, kindly let us know.

    Thank you.