Adjust column size on an Input Table

  • EngConJoel
    Asked on March 27, 2024 at 4:50 PM

    Hello,

    I want to adjust the column size to make column 1 smaller and the others bigger. Essentially i just need the "corrective actions column to be bigger.


    Adjust column size on an Input Table Image 1 Screenshot 20

  • Sim JotForm Support
    Replied on March 27, 2024 at 6:26 PM

    Hello Joel,

    Thank you for reaching out to Jotform Support. I’m sorry you're having difficulties with this. I found a way to change the width of the columns. By injecting the CSS code below:

    }
    .form-textbox {
    }
    .form-matrix-headers form-matrix-column-headers form-matrix-column_0 label {
    }
    #input_58_0_0 {
      width : 100% !important;
    }
    .form-matrix-table tbody {
    }
    .form-matrix-headers.form-matrix-column-headers.form-matrix-column_0 {
      width : 25% !important;
    }
    #cid_58 th.form-matrix-headers {
    }


    Let me show you how to do it:

    1. Go to Form Designer.Adjust column size on an Input Table Image 1 Screenshot 40
    2. Click on Styles.
    3. Enter the CSS Code.Adjust column size on an Input Table Image 2 Screenshot 51

    Here are the results after adding the code:

    Adjust column size on an Input Table Image 3 Screenshot 62

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

  • EngConJoel
    Replied on March 28, 2024 at 10:37 AM

    Hey Sim,

    Thanks for the help. That get's me close but is there a way to shrink column 1 (just the number column) even further so there is just enough space to show the number?

    Thanks again!!

  • Afzal JotForm Support
    Replied on March 28, 2024 at 10:54 AM

    Hi Joel,

    Thanks for reaching out to Jotform Support. I understand you are looking to set the width of the first column to a minimum. This can be fixed by adding custom CSS to your form. Check out the steps below to see how it's done:

    • Open your form in Form Builder and click on the blue Paint Roller icon on the right side of the screen.
    • Under the Styles tab, paste the code below into the Inject Custom CSS area.
    /*Reduce column width to minimum - 13343201*/
    th.form-matrix-headers.form-matrix-row-headers {
        padding-left: 2px;
        padding-right: 2px;
    }

    Here's what the result will look like:

    Adjust column size on an Input Table Image 1 Screenshot 20

    Here's the cloned version of the form that you can test.

    Please give it a try and let us know how it goes. 

  • EngConJoel
    Replied on March 28, 2024 at 11:15 AM

    Thanks Afzal!!

    We are almost there, now I want to take that extra space we've created and make the "corrective action column as large as we can. The assigned to column in the right size and the project and actual completion date column can be shrunk a bit if possible.

    Thanks!!

  • Ryan JotForm Support
    Replied on March 28, 2024 at 11:34 AM

    Hi Joel, 

    Thanks for getting back to us. You can make the "Corrective Action" column wider by injecting the CSS code in your form below:

    /* Adjust Corrective Action column width - 13343201 */
    .form-matrix-column_0 {
    min-width: 200px !important;
    }

    Result:

    Adjust column size on an Input Table Image 1 Screenshot 20
    Give it a try and let us know how it goes.

  • EngConJoel
    Replied on March 28, 2024 at 12:12 PM

    Hey,


    I believe I followed all the instructions correctly. When I am in the form under the edit function nothing has changed. However when I hit preview form everything looks the way I want it.

    With that said I did a test run of the form and this is what comes out when I download as a PDF. Is there a way to have the PDF show the same as the form? Or is there another way to make a table that is more customizable?

    This is what the PDF shows.

    Adjust column size on an Input Table Image 1 Screenshot 20 Screenshot 10

  • Neil JotForm Support
    Replied on March 28, 2024 at 12:26 PM

    Hi Joel, 

    Thanks for getting back to us. To avoid any confusion, I moved your other question to a new thread. You can check that out here.

    Let us know if you need any other help.