Support

Account

Home Forums ACF PRO Pre-populate ACF image field in front-end form with external image URL

Solved

Pre-populate ACF image field in front-end form with external image URL

  • I want to pre-populate a front-end ACF form using data retrieved from a different application. I have this working for most fields, but I am unsure if I can do this for images. Can I pre-populate an ACF image field input with an external image URL so that it will be uploaded as WP media like normal?

  • You would need to build custom JavaScript to do this. The image field is actually set to the attachment ID of the image, so the uploading of the image happens before the image is set in the image field. I have an example of dynamically populating an image field here https://github.com/Hube2/acf-dynamic-ajax-select-example/tree/master/dynamic-fields-on-relationship

    And this does not take into consideration the upload field used for people that are not logged in or do not have access to the media library. This upload works through a different mechanism.

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

The topic ‘Pre-populate ACF image field in front-end form with external image URL’ is closed to new replies.