Home › Forums › ACF PRO › Getting data from JSON – ACF Plugin › Reply To: Getting data from JSON – ACF Plugin
It would depend on the complexity of the fields involved.
Could something like this be done? Yes.
The basics would be to:
1) Created an acf/save_post filter
2) Check to see if the radio button is set to JSON
3) Get the value of the JSON field
4) decode the JSON, Import the data using update_field() calls using field keys
5) Update the radio to “Manual”
The problem here is in the importing, depending on your field complexity and that you need to use field keys because I’m assuming that this is for a new post that does not have values in all the other fields already.
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.