Hello https://formidableforms.com/knowledgebase/frm_autocomplete_options/
A) I'm doing it wrong or
B) the document is a little incorrect?
Can this be used for a "text" field or only dropdowns? if dropdowns, I see there is a checkbox, in the dropdown element for autocomplete.
so... I'm confused what actually works or not.
My goal, have a text field that is
--set to autocomplete (IF the user wants to use it or not).
--populate the values for autocomplete... like 100 options.
the example in the document above is a little lacking? thanks!!
Let see if I can help you. When you select the autocomplete checkbox on the dropdown, it tells Formidable to load the Chosen jQuery library, that Formidable embeds in its core code. The Chosen library is for dropdowns only. Truthfully, in all the time I've been using Formidable, I've never had a reason to use the frm_autocomplete_options hook. Interestingly, it's not in the Formidable Masterminds Codex yet either. I searched my dev environment and the associated apply_filters is in /formidable-pro/classes/views/frmpro-fields/back-end/autocomplete.php at line 33. The surrounding code is for adding options to an autocomplete dropdown. The documentation suggests text field and I think that's a typo. Where this filter is used is only for dropdowns.
BTW, the reason I never used this filter is because it's a whole lot easier for me to build dropdowns dynamically through code.
Please login or Register to submit your answer