How do I make the first row of a matrix table (text entry) read only | Experience Community
Skip to main content
Solved

How do I make the first row of a matrix table (text entry) read only

  • Jul 29, 2020 4:29 PM UTC
  • 2 replies
  • 153 views

MikeW
Level 5 ●●●●●
Forum|alt.badge.img+14
  • Level 5 ●●●●●

I'm using the text entry Matrix Table.
I've used 'Add default choices' to pipe in answers from a previous question into the first row of the table, but I would like to make those answers read only.

Best answer by SurajK

You can use the below jQuery code to make it read only,
jQuery('#'+this.questionId+' tbody tr:first').find('input[type="text"]').attr('readonly','readonly')

View original

2 replies

SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • Answer
  • Jul 30, 2020 2:50 PM UTC

You can use the below jQuery code to make it read only,
jQuery('#'+this.questionId+' tbody tr:first').find('input[type="text"]').attr('readonly','readonly')


MikeW
Level 5 ●●●●●
Forum|alt.badge.img+14
  • Author
  • Level 5 ●●●●●
  • Jul 30, 2020 3:07 PM UTC

Thanks - perfect