You are viewing limited content. For full access, please sign in.

Question

Question

Forms table with fixed number of rows - possible to make columns read-only for specific rows?

asked on March 15, 2019 Show version history

Hi everyone,

 

We're working with a customer to create an online employment application. One of the questions involves education history, including elementary, high school, and college education. Screenshot attached.

Is there a way to make the last 3 columns read-only for only the first row?

Thanks!

forms table.JPG
forms table.JPG (66.72 KB)
0 0

Answer

SELECTED ANSWER
replied on March 15, 2019 Show version history

Try the following:

$('#Field149\\('+ 1 +'\\)').attr('readonly', true);

Change the "Field149" to the corresponding id of your table column (course of study, last year completed, diploma or degree)

In this case the "1" corresponds to the row number that you want to make the column"read only"

 

An example of result is the following:

 

1 0
replied on March 15, 2019

Hi Harol,

I'm having a little trouble getting this to work for me. I've attached a screenshot showing the IDs of the columns in my table. 

For the "Diploma or Degree" column, for example, to make the first row read-only, my code would look like this, right?

$('#q37\\('+ 1 +'\\)').attr('readonly', true);

 

forms table2.JPG
forms table2.JPG (79.85 KB)
0 0
replied on March 15, 2019

Jacob, The correct form is:
 

$('#Field37\\('+ 1 +'\\)').attr('readonly', true);

 

1 0
replied on March 15, 2019

Got it. Works perfectly. Thanks so much!

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.