Hi,
I have a matrix question which has four lines (statements). The statements have linked to other questions (display logic). My question is how do create text boxes that allow respondent to fill in answer which are not in my list? Please see the picture below. 
Please help! I need this issue to be solved urgently!
I appreciate your response!
Regards,
Houston
Create text boxes in a matrix question for respondents who select "other"
Best answer by ahmedA
You can use this JS:
Qualtrics.SurveyEngine.addOnReady(function () {
document.querySelectorAll("td.last").forEach((item) => {
let sl = item.querySelector("[type='radio']");
item.querySelectorAll("*").forEach((child) => child.hide());
item.insertAdjacentHTML(
"afterbegin",
""
);
document.querySelector("#other_text_" + sl.name.split("~")[2]).oninput = function (e) {
if (e.target.value.trim() !== "") sl.checked = true;
};
});
document.querySelector("#NextButton").onclick = function () {
document.querySelectorAll("[id^='other_text_']").forEach((tb) => {
Qualtrics.SurveyEngine.setEmbeddedData(tb.id, tb.value);
});
};
});
You'll need to create ED for each choice like other_text_1, other_text_2 etc.
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.

