Had the same problem on a project I’m working on where subcribers / contributor’s are using the ACF_Form() to create new posts and also to upload images through the gallery field.
The problem occurs with current_user_can(‘edit_post’, $post_id ) returns false (this is checked when the user tries to upload an image through the media uploader ) if the post isn’t already created….so while using the form..you first want to create the post..and THEN let the user upload images through the gallery field. This worked for me… not the perfect sollution…anyone else have a better one, please let me know 🙂
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!