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

Signature Question - Disable or Readonly?

  • Feb 16, 2021 3:01 PM UTC
  • 2 replies
  • 122 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");

View original

2 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Answer
  • Feb 16, 2021 3:52 PM UTC

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 ●●●●●●●
  • Feb 16, 2021 4:14 PM UTC

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.