Support

Account

Home Forums General Issues Get field in specific post Javascript API Reply To: Get field in specific post Javascript API

  • API simply means application program interface. The details of what it does are not defined by simply using the term api.

    Reading the documentation it is clear to me that this API is for accessing information on the current page.

    This comes in handy for me because it makes it handy to get values from fields and set values in fields. It also enables me to dynamically alter one field based on a value entered into another field. For example, I can create a select field where the choices are dynamically generated based on the selection in another select field.

    AJAX requests, which is what a solution here would require, is not part of the ACF JS API. For adding AJAX requests I would suggest starting here https://codex.wordpress.org/AJAX_in_Plugins