How to align fields on form?

  • gp_mcsi
    Asked on April 29, 2024 at 6:34 PM

    Please help to figure out how to align and balance the four form elements:

    Designer/Requester (First and Last name), Designer/Requester email

    Project Manager (First and Last name) and Project Manager Email.

    Thank you!

  • Raymond JotForm Support
    Replied on April 29, 2024 at 11:04 PM

    Hi Gueipin,

    Thanks for reaching out to Jotform Support. I understand you'd like to align some of the fields in your form. We can do this with a few CSS codes. Let me walk you through it:

    • In Form Builder, click on the Paint Roller icon on the right.
    • Next, under the Styles tab, paste the following codes into the CSS box.
    /* align fields on 2nd and 3rd line on first page  - 14381841*/

    #id_30, #id_31, #id_3, #id_4 {
    width: calc(58% - 8px) !important;
    }

    /* Ends here */

    How to align fields on form? Image 1 Screenshot 20

    That's it. Feel free to test this cloned demo form or clone it to your account to inspect it more. We also have a guide on How to Inject Custom CSS Codes that you can check out.

    Give it a try and let us know if you need any help.

  • gp_mcsi
    Replied on April 30, 2024 at 6:01 PM

    You messed up my form. What did you do?

  • Aries JotForm Support
    Replied on April 30, 2024 at 8:46 PM

    Hi Gueipin,

    Thanks for getting back to us. I’m sorry you're having issues with your form. As I checked your form, my colleague did not change anything on your actual form. He just demonstrated how to align some fields on your form using custom CSS codes with the cloned version of your form. To confirm, have you followed my colleague's instructions and encountered an issue with your form? Can you please share with us more details about what happened to your form? so that we can help you further.

    Once we have a better idea of what’s going on, we’ll be able to come up with a solution.

  • gp_mcsi
    Replied on May 1, 2024 at 2:58 AM

    Hello!

    This code snippet:

    #id_30, #id_31, #id_3, #id_4 {
    widthcalc(58% - 8px!important;
    }

    completely messed up my existing formatting. I had to revert to my previous version of the form.

    Do you have any better idea to get what I intended to do?

  • Sonnyfer JotForm Support
    Replied on May 1, 2024 at 3:04 AM

    Hi Gueipin,

    Thanks for clarifying. I checked your form and see that you've removed the code snippet provided on your form. I'll need a bit of time to check this further, I will be back shortly.

  • Sonnyfer JotForm Support
    Replied on May 1, 2024 at 3:10 AM

    Hi Gueipin,

    Thanks for patiently waiting. I tried injecting the provided code by my colleague on a cloned form, but wasn't able to replicate the issue. The fields Designer/Requester (First and Last name), Designer/Requester email, Project Manager (First and Last name) and Project Manager Email gets aligned and your other forms fields aren't affected. Check out my screencast below to see my results:

    How to align fields on form? Image 1 Screenshot 20

    Can you try it again and see how it goes? If you run into the same issue again, please some screenshots for us to see the issue from your perspective.

    Keep us updated and let us know if you need any more help.

  • gp_mcsi
    Replied on May 1, 2024 at 5:32 PM

    Hi!

    Yes, I am able to add the code snippet to the injected CSS. I used the Advanced Designer button, and added to the CSS section there, which caused undesired effect.

    Thank you!

 
Your Answer