Home › Forums › Backend Issues (wp-admin) › All role in the User list field › Reply To: All role in the User list field
I don’t have all of the code for this. Basically you need to create an acf/prepare_field filter https://www.advancedcustomfields.com/resources/acf-prepare_field/. In this filter you need to get the current user’s role and then update the field setting for role accordingly.
// to set roles to all
$field['role'] = '';
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.