Home › Forums › ACF PRO › Loading data inside a custom field type › Reply To: Loading data inside a custom field type
So add your ajax action directly in the field class. For an example of this see any of the built in ACF relationship type fields. All of these use Select2 and are dynamically populated via AJAX.
Maybe you misssed it by the ACF select field has an option to do this already.
Presentation => Stylized UI
when turned on there is a second option to => Use Ajax to lazy load choices.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.