Populate Dropdown options from HTTP GET

0

Is it possible to dynamically populate dropdown options from the results of an HTTP GET?

IS answered
    0
    IS 2.19K Rep.

    I think it can be done.

    On the first page of your survey you can create hidden value fields like:

    Number of options

    Opt1

    Opt2

    Etc

    You can then use a script to perform the GET, parse it and use sgapisetvalue to set the values of the hidden fields

    On any page after the first you can pipe the values from Opt1, Opt2, etc into your answer options and use Logic on the option edit screen to choose whether to display the option based on the value of the Number of Options field.

    I have done something similar, but using URL variables instead of an HTTP GET.

    IS answered
      0
      Lola Gill 6.70K Rep.

      The Webhook (HTTP Connect feature) can be used to pre-populate answers to survey question. I don’t believe it can be used to dynamically create answer options within a question.

      You might consider exploring the API for that:

      https://apihelp.surveygizmo.com/help/surveyquestion-sub-object-v5#createobject

      I hope this helps!

      Lola Gill answered
        ×

        Login

        Question stats

        • Active
        • Views503 times
        • Answers2 answers
        • Followers1 follower