Skip to content

Instantly share code, notes, and snippets.

@joelhsmith
Created August 3, 2018 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelhsmith/b0440b24de14cdee1c4be2ecf2229990 to your computer and use it in GitHub Desktop.
Save joelhsmith/b0440b24de14cdee1c4be2ecf2229990 to your computer and use it in GitHub Desktop.
Deduplicate the labels in choice questions in Qualtrics
const labelCheckboxeChoices = Array.from(document.querySelectorAll('.q-checkbox'));
const labelRadioChoices = Array.from(document.querySelectorAll('.q-radio'));
var labelAllChoices = labelCheckboxeChoices.concat(labelRadioChoices);
labelAllChoices.forEach(function(e) {
if (e.innerText === '') {
e.remove();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment