How do I create matrix fields of fixed widths?

  • Profile Image
    johnelliott
    Asked on May 04, 2014 at 09:15 AM

    I need to be able to create matrix (text) input fields of specified widths.

    ATM, the field widths seem to be fixed, and can't be changed under Properties.

  • Profile Image
    jonathan
    Answered on May 04, 2014 at 10:42 AM

    Hi,

    You can inject CSS code to the form like this

    .form-matrix-values {

    padding-left: 8px !important;

    padding-right: 8px !important

    }

    /*---1st column width---*/

    .form-matrix-values .form-textbox {

    width: 100px;

    }

    /*---2nd column width---*/

    .form-matrix-values +

    .form-matrix-values .form-textbox {

    width: 100px;

    }

     

    /*---3rd column width---*/

    .form-matrix-values +

    .form-matrix-values +

    .form-matrix-values .form-textbox {

    width: 100px;

    }

     

    /*---4th column width---*/

    .form-matrix-values +

    .form-matrix-values +

    .form-matrix-values +

    .form-matrix-values .form-textbox {

    width: 100px;

    }

     

    /*---5th column width---*/

    .form-matrix-values +

    .form-matrix-values +

    .form-matrix-values +

    .form-matrix-values +

    .form-matrix-values .form-textbox {

    width: 100px;

    }

    in this CSS code, the common width was 100px unit.

    Guide: -How-to-Inject-Custom-CSS-Codes

    Sample result of output will be like this

     

    Hope this help. Inform us if you need our assistance.

    Thanks!