Dynamically Populating fields via REST requests

  • Vess Bakalov
    Asked on October 25, 2020 at 7:13 AM

    I have seen the article on passing data via the form URL.

    What about dynamically populating a drop down via a REST request?


    For example - I may have a list of states in the first drop down. That I can populate via the URL since the number is manageable. Once a state is selected, I want the second drop-down to be populated with all the cities in the chosen state.

    I don't want to pass every single city initially - I want the second drop down to be populated dynamically (by requesting the data from a URL) based on the choice in the first one.

    I hope this makes sense

  • Sonnyfer JotForm Support
    Replied on October 25, 2020 at 9:42 AM

    Hello Vess - Unfortunately, I'm not well-versed in APIs. I'd suggest reaching out to our API team instead at api@jotform.com as they are more knowledgeable in this matter.

    Meantime, you may want to check out our API documentation. https://api.jotform.com/docs/

  • Sonnyfer JotForm Support
    Replied on October 25, 2020 at 9:55 AM

    Hello again - I re-read your requirement and it seems it can be achieved without REST requests but instead using our Dynamic Dropdown widget to have the second dropdown options based on the first dropdown selection. Example:

    1603634098 5f9583b2608da kldw Screenshot 10

    Hope this could work for you.

  • vess
    Replied on October 25, 2020 at 6:28 PM
    A better example would be coding a customer and displaying all their
    transactions. Something that can't be fully pre loaded when the page loads
    up initially.
    ...
  • jherwin
    Replied on October 26, 2020 at 12:39 AM

    Sorry, but I don't fully understand your latest response. By "displaying all their transactions", do you mean, you want to pull data from existing submission? Can you please explain your question in details?