Please help us help you and fill where relevant:
LimeSurvey version: 6.15.4
Own server or LimeSurvey Cloud: Limesurvey Cloud
Survey theme/template: Fruity
==================
Hi! I would like to do answer codes visible on a survey.
I tried this but it didn't work:
forums.limesurvey.org/forum/can-i-do-thi...swer-codes-in-survey
I found some code but it uses "imput value" which in radio butom its ok but in multiple options question appears "Y - ":
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll('.answer-item').forEach(function (item) {
const input = item.querySelector('input');
const label = item.querySelector('label');
if (input && label) {
const code = input.value;
const text = label.textContent.trim();
label.textContent = `${code} - ${text}`;
}
});
});
Do you know some javascript that i can copy to custom.js and works for all type of question? Or some javascript i can use for multiple option questions?
Thanks in advance.