Custom Fields
Re-Envisioned
Support Meta Box Conditional Logic how to disable or readonly a fieldgroup for a specific user or user role ?

  • Creator
    Topic
  • #18308
    sofdesigne
    Participant

    Hi, i have two admins with different roles,
    1st – can read and edit any field in a fieldgroup.
    2nd – can readonly a specific fieldgroup, and edit other fieldgroups

    it’s just an example, because there are many fieldgroups and i need one of them to be readonly for that specific user.

    is there a way to do this ?

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #18321
    Anh Tran
    Keymaster

    Hi,

    The plugin doesn’t support hiding fields by user roles/IDs. You can try to add your own JS callback or use Meta Box Include Exclude extension. This extension works with user roles/IDs, but works for showing/hiding meta boxes, not fields.

    #18361
    sofdesigne
    Participant

    Hi, thanks for your response,
    but i am not talking about hiding and showing, it’s about readonly or disabling the modifying ability for some users, they still need to see the information on fields without modification !

    is that doable ?

    thanks

    #18373
    Anh Tran
    Keymaster

    Hi,

    Thanks for the clarification. I think it can be done with custom JS code. Basically, you need to listen for changes in inputs and enable/disable the readonly attribute of fields.

    #18376
    sofdesigne
    Participant

    Thanks, will try to findout how to do it, cause i am not a coder and have no idea where to start, if you can help to show me the path, i will appreciate it, thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash