How can I autofill answers in rows below click? | XM Community
Solved

How can I autofill answers in rows below click?

  • 27 July 2021
  • 2 replies
  • 11 views

Hey everyone this is my first post, so hopefully I do it right. I have a side by side question with 4 columns and 20 rows. Each column x row cell has two options Option A and Option B. In general, responses will begin with A then switch to B at one of the rows.
I would like it if participants only have to click once per column (rather than 20 times). The first half is easy: I set Option A as the default. What I would like to happen is that once the participant clicks their first B in a given row, all of the rows below it automatically switch to B as well.
Is there a way to do this with JavaScript?

icon

Best answer by cbhavsar 30 July 2021, 09:27

View original

2 replies

Userlevel 4
Badge +26

Hi,
Welcome to XM Community! If I understand your question correctly, then you have a requirement where all 20 statements have a common answer either Option A or Option B and user should be able to select any one of them.
Instead of using JavaScript, I suggest you club all 20 statement in to one option with "
" as a separator. So user would have to click only once to select Option A or Option B for all 20 statements.
Example:
image.pngAll the best for your project!

Hey cbhavsar, thanks for the comment. I see why that was confusing. There are 20 statements and people will SWTICH between A and B for some value of those 20. For example I'd say AAAABBBBBBBBBBBBB. I just don't want them to have to click all of those Bs. Does that make more sense?

Leave a Reply