Support

Account

Home Forums Backend Issues (wp-admin) Updating image field with JavaScript Reply To: Updating image field with JavaScript

  • I have an example that dynamically sets an image field here https://github.com/Hube2/acf-dynamic-ajax-select-example/tree/master/dynamic-fields-on-relationship. If you look in the JS file you will see what needs to be done. Basically you need to insert the image ID into the field, you need to set the src value of the image element and you need to add a class to the image container.