Support

Account

Home Forums Backend Issues (wp-admin) Javascript equivalent to get_fields() for current values?

Solving

Javascript equivalent to get_fields() for current values?

  • 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/

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Javascript equivalent to get_fields() for current values?’ is closed to new replies.