I create Repeater field table for Advanced Custom Field plugin, I set location show on User, but I want User only views not edit. and Admin will edit. So, how to disable field edit on User?


ACF has some actions and filter, one of the actions you should check is acf/render_field. It runs to render a field input. You can hook into this action and modify your input to be read-only or even completely replace the input with its value.

Another option is to set up location rule: User role - is equal to - Administrator. This will show the edit form to Administrators only. And then write some custom code to just show the fields values to non-administrator.

Not the answer you're looking for? Browse other questions tagged or ask your own question.