...
Code Block |
---|
"lf_locations": { "label": "Locations", "question_type": "dynamic_multiple_choice", "values": [ { "location": "Field 1" }, { "location": "Greenhouse" }, { "location": "Field 2" }, { "location": "Riparian buffer zone" } ] }, "lf_crops": { "label": "Crops", "question_type": "dynamic_multiple_choice", "values": [ { "crop": "Cosmic crunch (apple)" }, { "crop": "Honeycrisp (apple)" }, { "crop": "Red delicious (apple)" } ] } |
The survey, when generated would do roughly the following:
Check to see if it had any dynamic content
If so, match the dynamic content labels with the payload - in this case “lf_crops” and “lf_locations”
Populate those survey questions with the dynamic content, or handle any issues with those questions (e.g. missing or malformed content)
Other considerations: SurveyStack would need to define error handling in the case where dynamic inputs are missing or malformed.
...