autocomplete field with data from external source


This Discussion is public



I need to dynamically populate dropdown field values, where data for the field comes in JSON format from an external API. The values must be updated everytime the entry in the field changes. Something like this:

frm_setup_new_fields_vars filter does not work for my case as values are loaded only once, when the form is displayed.



If you want to load data dynamically in real time when the form changes, the only way to do it is with Ajax. You have to use jQuery to monitor the field you are using as a trigger, then execute a PHP function on the server to process the data and send it back to the browser. This doesn't need to be tied to a Formidable hook. You have to create the jQuery and PHP functions. It can get pretty complicated to code.

Reply to this Discussion