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:
The topic ‘Disable Repeater 'Add Row' Button’ is closed to new replies.
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!
© 2022 Advanced Custom Fields.