Support

Account

Home Forums Backend Issues (wp-admin) Get the saved value from a dynamically loaded Select field using JavaScript API Reply To: Get the saved value from a dynamically loaded Select field using JavaScript API

  • The field definition really won’t help me.

    When you make the AJAX request you need to send the current post ID as well as any other data you’ll need to get the current value to be returned.

    Another alternative is to also use an acf/prepare_field filter to also set the choices in PHP. If you do this then ACF will set the selected value. You can then get the selected value before updating the choices using JS and then reset the selected value after.