Form Generator and Select List based on Filter

5 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 10   (RSS)

By kitsguru - June 1

In  my Section Editor I have a pull down list that uses advanced mySQL based on a filter. Specifically province filtered by country.

Is there a way to add this to the Form Generator Plugin?

Jeff Shields

By kitsguru - June 9

just point me in the right direction, I can take it from there

Jeff Shields

By kitsguru - June 9

just point me in the right direction, I can take it from there

Jeff Shields

By daniel - June 10

Hi Jeff,

Sure thing!

  • The JS trigger that attaches to the parent select field can be found near the end of /cmsb/lib/fieldtypes/list.php between lines 172-178 - it calls the JS function updateListFieldOptions()
  • updateListFieldOptions() can be found in /cmsb/lib/menus/default/edit_functions.js on line 193. This runs an AJAX call to fetch the new filtered results from ajaxUpdateListFieldOptions()
  • ajaxUpdateListFieldOptions() can be found in /cmsb/lib/menus/default/actionHandler.php on line 89.

As this functionality is set up to specifically work in the CMSB admin, it may reference some values that aren't generated by default with the Form Builder plugin, but these code sections should broadly contain what's necessary to create a manual implementation.

Let me know if you have any questions about what you find!

Thanks,

Daniel
Technical Lead
interactivetools.com