Qbie here
Q1 is asking for the age of the respondent.
Q2 is asking how many they are during a trip.
Q3(Matrix table) would be conditioned to display if Q2 is greater than 1, asking to enter the age of each person included in a trip.
Now if the Q2 is equal to 1, Q3 should not be displayed but I would need to push the Q1 value to Q3. Is there a JavaScript that can help achieving this?
How to force a response in a qestion using JavaScript
Best answer by TomG
I think you meant:
Q1 is asking for the age of the respondent.
Q2 is asking how many they are during a trip.
Q3(Matrix table) would be conditioned to display if Q2 is greater than 1, asking to enter the age of each person included in a trip.
Now if the Q2 is equal to 1, Q3 should not be displayed but I would need to push the Q1 value to Q3. Is there a JavaScript that can help achieving this?
You don't really need JS for this:
- Q3 should be a text form, not a matrix.
- Always display Q3
- Use default choices to pipe the answer of Q1 into the first row of Q3 (i.e., Yourself)
- Add display logic to the rows of Q3 (2 through n) based on the answer to Q2
Optionally, you can automatically click the Next button if the answer to Q2 is 1.
Qualtrics.SurveyEngine.addOnload(function() {
if("${q://QIDx/ChoiceTextEntryValue}"=="1"}) this.clickNextButton(); //Change QIDx to correct id
});
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.
