How to disable the first two columns of the matrix table making it unclickable.

  • choza
    Asked on June 3, 2015 at 2:40 PM

    I would like to make a matrix that has multiple columns 'locked' - as in 2 columns on the left side with descriptive elements that cannot be changed and then the rest of the columns as answer columns.

     

    Please advise!

     

    Thanks so much!

  • Mike_G JotForm Support
    Replied on June 3, 2015 at 4:38 PM

    I suppose you are pertaining to a Matrix with textboxes. 

    How to disable the first two columns of the matrix table making it unclickable Screenshot 60

    I understand that you would like the first two columns locked or become read-only.

    You can either,

    1. Add "disabled" to the <input> element of the <html> source code of your form: 

    How to disable the first two columns of the matrix table making it unclickable Screenshot 71

    Then, 

    How to disable the first two columns of the matrix table making it unclickable Screenshot 82

    And when you embed it to your website, 

    How to disable the first two columns of the matrix table making it unclickable Screenshot 93

    It would result to this. 

    How to disable the first two columns of the matrix table making it unclickable Screenshot 104

    Or

    2. Add custom CSS codes to the Matrix using this guide.

    .form-matrix-table td:nth-child(-n+3) input{

    opacity: .5;

    pointer-events: none;}

    This would make the input field of the first and second column of the matrix table unclickable.

    I hope this helps. Let us know if you need further assistance. Thank you.

  • academicproofreading
    Replied on August 30, 2016 at 10:20 PM

    This is a great answer - is there a way to make only the second column read-only (using CSS)?
  • beril JotForm UI Developer
    Replied on August 31, 2016 at 3:41 AM

    On behalf of my colleague, you're most welcome. I've created a separate thread for you, so anyone in the support staff will be able to assist you with your specific requirement. Please follow up there:

    https://www.jotform.com/answers/920964