Dynamically creating a drop down list with related data | XM Community
Skip to main content

We are trying to create a training registration form that allows the user to select a specific training from a drop down list. Each training has an associated unique training ID. We would like to capture the ID of the selected training and send it to a custom API we have developed when the survey is completed.
I have seen two examples that show how to populate a drop down using a file/API call, but I don't see how we could include an associated training ID, which is required by our API to complete the training registration.
For example:
1) The survey loads the data for the drop down from a webhook or flat file
2) User selects training they want to register for
3) User completes survey
4) Webhook sends the training ID for the selected training to our API

You could use select 2 for displaying the training names. Then, use JS to map those names to the ID and store that as an embedded variable.


Now I just need to figure out what select 2 is! :-)


Getting Started | Select2 - The jQuery replacement for select boxessearch the community. Lots of examples related to Select2.


Leave a Reply