Hi.
On post save, I want to dynamically populate a text field using an image field.
So after I add an image to the image field [logo] and hit save/publish, I would like the image url to populate a text field [logo_url].
This is due to a client using a plugin that only works with meta keys and the meta key for the image is the ID, so I need to auto-populate a text field with the url.
Got it!
function my_acf_save_post( $post_id ) {
// get new value
$value = get_field('logo');
// do something
update_field('logo_url', $value);
}
add_action('acf/save_post', 'my_acf_save_post', 20);