I’d like to modify my Repeater buttons/links based on the current User’s role, disabling them (or adding a class) so that only certain users with the proper capabilities can add more rows. After some searching here, I have what seems to be an almost-working solution, but I don’t think the buttons exist yet when my function runs (code shown below).
Is there a flag that I can listen for to know when all of the ACF fields and elements are finished loading? Thank you.
For reference, this thread was very similar but unfortunately no solution was presented:
Thanks for your reply; I got it working like this (using acf/load_field to first check permissions and set a global var):
I resolved this problem with:
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
Helping others is a great way to earn karma, gain badges and help ACF development!
#DropzoneJS is now integrated into @ws_form allowing you to create no-code drag and drop file upload fields on your #WordPress forms. Fully integrated with @wp_acf. Fully responsive. Selfie feature! Learn more here: https://t.co/JUQmH2z315 pic.twitter.com/JhfO0LVQCm— WS Form (@ws_form) January 8, 2021
© 2021 Advanced Custom Fields. Subscribe