Signature Question - Disable or Readonly? | XM Community
Skip to main content
Solved

Signature Question - Disable or Readonly?

  • February 16, 2021
  • 2 replies
  • 90 views

Forum|alt.badge.img+10

Is there a way to disable the Signature question that has already been signed? Use case is a retake link scenario where the question will be visible again but we do not want it to be active. I tried changing the attribute to readonly or disabled, but perhaps I am not properly referring to the element ID. Or maybe there's another way? Thank you!

Best answer by rondev

Use the below code, which will disable the signature question only if it is retake link:

var qid = this.questionId;

if( "${e://Field/Q_R}" != "" )

jQuery("#"+qid+" .QuestionBody").css("pointer-events","none");

2 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Answer
  • February 16, 2021

Use the below code, which will disable the signature question only if it is retake link:

var qid = this.questionId;

if( "${e://Field/Q_R}" != "" )

jQuery("#"+qid+" .QuestionBody").css("pointer-events","none");


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • February 16, 2021

You could look at disabling pointer-events.
JS:

this.getQuestionContainer().style.pointerEvents = "none"

Question HTML:

Replace *** with the question ID.
This will disable any kind of clicking on the question.