Make previous responses unedittable | XM Community
Skip to main content

Following the discussion on, i have been able to make my survey work perfectly. The survey is originally filled by a student then routed to a Mentor then to an HOD in that order.

Question: The mentor sees the students responses and the HOD also sees the student & Mentor’s responses. Now i want to make the student’s responses un-editable when the Mentor is looking at it and the (student & Mentor’s) responses also un-editable when the HOD is looking at it. 

Please help me figure this out. I’m just going to tag some people i think can help but anyone else can assist please. 

@Deepak @TeachMeQualtrics @Clint 

@Bee 

If you have achieved the process of who sees which block, firstly that’s great!

Secondly, if you want to disable or not let the other person change or edit the already filled responses, you can use another embedded data along with a JavaScript code which you can define early in survey flow. 

So, let’s say, Mentor is looking at student’s responses so embedded data Mentor=1 you can pass in URL and use the below JavaScript in all the questions which are asked to a student.  Here I have disabled all Input elements except Next Button (as it would be required for navigation) if the mentor embedded data is 1.

Qualtrics.SurveyEngine.addOnload(function() {
// Replace 'Mentor' with your embedded data variable name
var MentorValue = "${e://Field/Mentor}";

if (MentorValue === '1') {
// Disable all input elements
jQuery(':input:not(#NextButton)').prop('disabled', true);
}
});

You can do similarly with Mentor and HOD combination and add that on both student and mentor questions.
Hope it helps!


Great! @Deepak  thanks a lot. It worked except that it doesn’t work on ‘signature’ questions. 

Question that allow respondents to sign are still changeable though. Can you assist with that please.


Try this

Qualtrics.SurveyEngine.addOnload(function() {
// Replace 'Mentor' with your embedded data variable name
var MentorValue = "${e://Field/Mentor}";

if (MentorValue === '1') {
// Disable all input elements
jQuery(':input:not(#NextButton)').prop('disabled', true);
jQuery('canvas.SignatureCanvas').css('pointer-events', 'none');
}
});

 


That worked @Deepak . You really are a PRO 👌🏻


Leave a Reply