I want to use Qualtrics to create a checklist of sorts. I was planning to use multiple choice multiple response questions but was wondering if there was some javascript that would automatically strikethrough the list item once someone clicks the checkbox. This would be the same behavior as checklists in Google Docs. 
Strikethrough statement when checkbox is selected?
Best answer by Rudi
Hi there,
yes, this is doable.
- add the class .lineThrough{text-decoration:line-through;} in the look and feel section ->style -> custom css
- add the below javascript to the respective question
Qualtrics.SurveyEngine.addOnload(function()
{
this.questionclick = function(event,element)
{
if (element.type == 'checkbox')
{
let choiceId = element.id;
console.log(choiceId)
let selectedChoiceId = choiceId.split('~')[2]
let lw = document.getElementById(this.questionId+'-'+selectedChoiceId+'-label') //get the label element
let ls = lw.getElementsByTagName('span') // get the span element where the label text is
console.log(ls)
if(element.checked == true){
ls[0].addClassName('lineThrough') //if choice is selected add class
}else{
ls[0].removeClassName('lineThrough') //if choice is deselected remove class
}
}
}
});
Please note that this will work with the flat layout
Best regards
Rudi
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
