frm_autocomplete_options, any used this?

By: Larry Kolinek | Asked: 04/22/2023
ForumsCategory: General questionsfrm_autocomplete_options, any used this?
Larry Kolinek asked 2 years ago

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!!

1 Answers
Victor Font answered 2 years ago
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.
Victor Font replied 2 years ago

BTW, the reason I never used this filter is because it's a whole lot easier for me to build dropdowns dynamically through code.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right