Home › Forums › General Issues › When to use the ACF JavaScript API library? › Reply To: When to use the ACF JavaScript API library?
In your example you could use the api when setting the value of the third field. But I wold likely to id the same way because it is a text field.
You could also use the api to get the value of the select fields, but again, is not necessary.
On more complex fields, for example and image field or a color picker fields and others, in this case you would need to use the api because there are a lot of things that need to happen when the value is changed and it is a lot more complicated to get the field value in some cases and the api will make it easier in these cases.
I generally stick with doing it myself without the api unless I run into things where I have a problem doing what I need to do.
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.