Home › Forums › ACF PRO › ACF in jQuery function › Reply To: ACF in jQuery function
As I said, the ACF JS API cannot be used for displaying data. The input field must be on the page, which it is not on the front of the site unless this is an ACF form.
I don’t know how else to explain this. ACF JS functions are for making changes in the admin or when editing content, not for displaying content.
Where you are doing this var field = acf.getField('fork_model');
you need to make an AJAX request to the server to get the data.
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.