Prevent editing a text box in constant sum question type | XM Community
Skip to main content
Question

Prevent editing a text box in constant sum question type


Akdashboard
Level 4 ●●●●
Forum|alt.badge.img+6
Hello all, I want to create a constant sum question where the first entry is a value piped in from embedded data (pretty straightforward) BUT I don't want to allow the survey taker to edit this value, only the other text entry portions of the constant sum question. Any ideas our there on how to do this?

4 replies

  • 0 replies
  • June 21, 2019
Hello @Akdashboard , Paste the below code in the js(OnReady) of constant sum question: `jQuery("#"+this.questionId+" .InputText:first").attr("readonly",true);`

Akdashboard
Level 4 ●●●●
Forum|alt.badge.img+6
  • Author
  • Level 4 ●●●●
  • 488 replies
  • June 21, 2019
> @Shashi said: > Hello @Akdashboard , > > Paste the below code in the js(OnReady) of constant sum question: > > `jQuery("#"+this.questionId+" .InputText:first").attr("readonly",true);` That didn't seem to work... Please ignore the horrible formatting: https://bcbssc.az1.qualtrics.com/jfe/preview/SV_6zZ0LgfB46RW3LD/BL_3lPGcJYCIf8wMPr?Q_SurveyVersionID=current !

Akdashboard
Level 4 ●●●●
Forum|alt.badge.img+6
  • Author
  • Level 4 ●●●●
  • 488 replies
  • June 21, 2019
I doubt this will matter, but it is a matrix question with Constant Sum selected.

Akdashboard
Level 4 ●●●●
Forum|alt.badge.img+6
  • Author
  • Level 4 ●●●●
  • 488 replies
  • June 24, 2019
I am giving this thread a little bump. Anyone have any idea how to achieve this?

Leave a Reply