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

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

  • July 29, 2020
  • 2 replies
  • 104 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')

2 replies

SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • Answer
  • July 30, 2020

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 ●●●●●
  • July 30, 2020

Thanks - perfect