Lock value in rows | XM Community

Lock value in rows

  • 31 January 2023
  • 5 replies
  • 9 views

Userlevel 4
Badge +17
  • Level 5 ●●●●●
  • 44 replies

Hello All I have two questions and i want to show value entered in one question in another question and want to fix that value so that respondent cannot edit it again. Although i am aware of the default choice functionality but still i am able to edit it is there a way to fix the values and lock the cell in second question.
image.pngimage.png


5 replies

Userlevel 7
Badge +27

You can use JavaScript to make the inputs in the second question read only.

Userlevel 4
Badge +12

Nikkki
Use belo code:

document.getElementById('ID').setAttribute('readonly', true);

You just need to add ispect element of your filled input box and find it's ID. Pass that ID in above code.


Userlevel 7
Badge +27

https://community.qualtrics.com/XMcommunity/discussion/comment/54856#Comment_54856It is better not to hard code ids. Use the power of jQuery to do it in one line without having to find ids. If you want to update the inputs in the first column, you can do:
jQuery("#"+this.questionId+" .SBS1 input").prop("readonly",true);

Userlevel 4
Badge +12

https://community.qualtrics.com/XMcommunity/discussion/comment/54859#Comment_54859Thanks TomG. I am not good with JS or javascript so I will definetly look into your advise ;)

Userlevel 4
Badge +17

TomG and dipeshsingh I was able to make the area unclickable so that values cannot be changed.
Thank you for the suggestions.

Leave a Reply