There isn’t any way to hide a tab and all of it’s sub fields based on the user role, removing the tab field would simply put the fields into the previous tab.
This would need to be done on the tab field and all of the fields in that tab.
You would need to create an acf/prepare_field filter https://www.advancedcustomfields.com/resources/acfprepare_field/ and attach it to every field you want to remove. In you filter you would check the current user’s role. If the user is not supposed to see this field the you return false from your filter and this will remove the field from field group for that user.
Viewing 2 posts - 1 through 2 (of 2 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