Support

Account

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
    	
    	}
    }