I'm using JS code to make each cell in column in a matrix table read only - see below...
jQuery("#QR\\\\~QID90\\\\~13\\\\~1").prop("readonly",true);
jQuery("#QR\\\\~QID90\\\\~4\\\\~1").prop("readonly",true);
jQuery("#QR\\\\~QID90\\\\~6\\\\~1").prop("readonly",true);
I realized from inspecting the cells during the survey that the id changes during the survey, so I updated the code to below to cater for each loop:
jQuery("#QR\\\\~1\\\\~QID90\\\\~13\\\\~1").prop("readonly",true);
jQuery("#QR\\\\~1\\\\~QID90\\\\~4\\\\~1").prop("readonly",true);
jQuery("#QR\\\\~1\\\\~QID90\\\\~6\\\\~1").prop("readonly",true);
jQuery("#QR\\\\~2\\\\~QID90\\\\~13\\\\~1").prop("readonly",true);
jQuery("#QR\\\\~2\\\\~QID90\\\\~4\\\\~1").prop("readonly",true);
jQuery("#QR\\\\~2\\\\~QID90\\\\~6\\\\~1").prop("readonly",true);
However, this still didn't work. What am I doing wrong? FOUND THE ISSUE - WAS MISSING AN UNDERSCORE - SORRY
But, if there is an easier way to make a whole column read only (rather than one cell at a time) that would be good to know.
JavaScript in Loop & Merge
Best answer by TomG
Yes:
jQuery("#"+this.questionId+" .c4 input").prop("readonly",true);
It is rarely necessary to use element ids to find elements.
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
