Home › Forums › General Issues › Checking for values in an AC-field › Reply To: Checking for values in an AC-field
You set up a acf field group with an image field that has the location rule
User Form is equal to All (or add/edit or whatever place you want it to appear)
You side load the image, this returns and image attachment ID
you then update the ACF field with that ID
// use field key for fields that do not already have values // 3rd parameter is the post id where to store the value, in this case it is a user update_field('field_XXXXX', $attachment_id, 'user_'.$user->ID);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.