Search code examples
sitefinity

sitefinity form populate dropdownlist from API


I would like to create a form and add a dropdown list widget that will pull its choices from an API. I don't see any setting for that where would I call the API? what I was able to find is from 2014 so I think its outdated.

https://www.progress.com/blogs/sitefinity-custom-form-widget-with-dependent-dropdowns


Solution

  • It's cake... just use a regular input, then on the page use a Javascript widget and wire it up into a dropdown.

    https://demos.telerik.com/kendo-ui/dropdownlist/remotedatasource

    Use whatever JS component you want

    Just a note though, give your input a cssclass name that will let you easily find it with the javascript.

    I have a post on this https://www.sitefinitysteve.com/blog/binding-sitefinity-form-field-to-remote-data