Support

Account

Home Forums Backend Issues (wp-admin) ACF Javascript API – Dynamically Update select2 Field Options Reply To: ACF Javascript API – Dynamically Update select2 Field Options

  • Actually, no, there’s nothing in the API that I’m aware of that will let you update the options in the select field. You’d still need to do it manually. The only way I’ve found to do this is to destroy all of the existing options and rebuild them every time. You can see an example of this here https://github.com/Hube2/acf-dynamic-ajax-select-example/blob/master/dynamic-select-example/dynamic-select-on-select.js in the “update_cities_on_state_change” function