No, there isn’t a way to use the gallery field for users that are not logged in or do not have permissions to add media.
To do what you want you would have to use to supply a different field for users than what is available in the admin. Create a gallery field for use in the admin and a repeater field for use on the front end. Then you would use acf/prepare_field on each of these to show/remove one of these fields dependent on if shown on front/admin. Then you would need to create an acf/save_post action that would get the values from the repeater when a form is submitted on the front end with acf_form() and update_field() on the gallery field to add the images to the gallery.
Overall this would be a lot of work. The easier option is to just use a repeater instead of the gallery and then code display of the gallery to use the repeater instead.
@guillermo is it a great solution, no, is it “A” solution, yes.
If I needed to do this I would look to something more complex, like creating permissions in WP to allow the use of what was needed. I have no idea what I’d end up with because I’ve never had to do it, but I do know that it is probably possible. Doing this would be outside of ACF.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users