So the title might not be entirely clear. I was wondering if, while in the editor (classic), it is possible to retrieve a JS object containing all current values of all fields on the current admin screen. Basically the equivalent of what is returned by get_fields()
, but run in the client and gets everything on the screen vs database. The goal is to enable real-time previews on a JS frontend by storing all of the pages field values via a storage API such as IndexedDB. Is this currently possible?
No, there isn’t. There is a way to get individual field values but there’s nothing in the API that I can see that will get an array with all of the values of all fieldhttps://www.advancedcustomfields.com/resources/javascript-api/. https://www.advancedcustomfields.com/resources/javascript-api/