Home › Forums › Add-ons › Repeater Field › Disable Repeater 'Add Row' Button › Reply To: Disable Repeater 'Add Row' Button
Thanks for your reply; I got it working like this (using acf/load_field to first check permissions and set a global var):
add_action ( 'admin_footer', 'check_ACF_permissions_button' );
function check_ACF_permissions_button($post) {
if ($GLOBALS['projectManager'] === false) {
?><script type="text/javascript">
jQuery('a[data-event="add-row"]').remove();
jQuery('a[data-event="remove-row"]').remove();
</script><?php
}
}
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.