Support

Account

Home Forums ACF PRO Field editable only by admin, view-only for rest

Solved

Field editable only by admin, view-only for rest

  • Hello. Is there a mechanism in ACF Pro to have a field as a view-only field for regular users (Editor and below), and only leave it editable for Admin users? Thanks.

  • It depends on what field type it is. If it’s one of the basic text type fields yes. You can use an acf/prepare_field https://www.advancedcustomfields.com/resources/acf-prepare_field/ filter to set the readonly field value to true for not admins. This will not work for all field types. It can probably be done for other field types using JavaScript, but that is not simple and there aren’t any examples of doing it that I know of.

  • Thank you John. I was hoping to have this as a setting, not stuff to put in my functions.php file. Content should be separate from themes. Biggest mistake with wordpress world.

    Anyway, thanks.

  • My response to that is to put it in a plugin. This is not a setting that you’ll likely see added to ACF fields.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Field editable only by admin, view-only for rest’ is closed to new replies.