Create multi-select box dynamically from array | XM Community
Question

Create multi-select box dynamically from array

  • 18 March 2019
  • 1 reply
  • 40 views

Is there some way of creating new choices in multi-select boxes dynamically? I have an array of items that is unique to each user and saved with each session as a JSON string in an embedded variable. When the user fills out the survey again at a later date, I want to populate multi-select choices from the updated array from the last session.

I tried adding rows to the multi-select box, using the same HTML element structure but updating the values. When stepping through the code, the new choices would display briefly, but then they were hidden, even though you could still select the row.

1 reply

Userlevel 6
Badge +27

Use select2 to create dynamic drop down and store the result in the hidden text entry question in comma separated format.

Leave a Reply