How to change the width of the Zip field in the Address Element using CSS

  • fdscorp2008
    Asked on April 5, 2023 at 7:29 PM

    I'd like to resize a Zip Code field inside the Address but I cannot get it done. I tried thru the Advanced Designer tool but it only changes the Height property. I need to make the field smaller so I was trying to change the Width property but it won't make any change no matter what values I assign to this property.

    Any help would be immensely appreciated

    Thanks

    Mario

  • Bryan JotForm Support
    Replied on April 6, 2023 at 1:07 AM

    Hi Mario,

    Thanks for reaching out to us for help. You can Inject a CSS Code into Your Form to re-size the Zip Code field in the Address element. It's easy to do. Let's do it:

    1. In Form Builder, click on the Paint Roller icon on the top-right side of your screen.
    2. In the menu that opens on the right side of your screen, click on Styles at the top of the menu.
    3. Inject the CSS Code below into the box below Inject Custom CSS Code:

    #input_13_postal {
      width: auto !important;
      min-width: 313px !important;
    }

    4. Click on Save on the bottom-right side of the menu and you're good to go.

    1680757599 642e535fe244e  Screenshot 10

    Let us know if there’s anything else we can help you with. 

  • fdscorp2008
    Replied on April 7, 2023 at 11:42 AM

    Thank you so much Bryan. It worked like a charm

  • fdscorp2008
    Replied on April 7, 2023 at 12:22 PM

    One more question

    Is there a way to re-arrange the elements inside the Address box, like shrinking two fields? Because only the box can be shrunk, not the elements in it.

  • Ryan JotForm Support
    Replied on April 7, 2023 at 2:53 PM

    Hello Mario,

    Thanks for getting back to us. To avoid confusion, I moved your other question to a new thread and helped you with that here.

    Reach out again if you have any other questions.