Skip to content

Instantly share code, notes, and snippets.

@marketinview
Last active October 23, 2022 16:57
Show Gist options
  • Save marketinview/d9eb58d10f08297992c3 to your computer and use it in GitHub Desktop.
Save marketinview/d9eb58d10f08297992c3 to your computer and use it in GitHub Desktop.
Qualtrics: Change Text Input Field to Read Only. This script changes a text input field to read only (a side-by-side question in this example). This could be used if you want to display a default value in a field, but don’t want it to be changed. #qualtrics #js #jq #text #readonly
Qualtrics.SurveyEngine.addOnload(function() {
var qid = this.questionId;
jQuery(('#QR~'+qid+'#1~1~1~TEXT').replace(/~/g, "\\~")).attr("readonly", "readonly");
}
@marketinview
Copy link
Author

marketinview commented Nov 14, 2017

See additional Qualtrics solutions at: https://qualtricswiki.tgibbons.com/doku.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment