I am trying to hide metabox fields based on user role. For that I am trying to use rwmb_before action. The code is pasted below.
The problem that I am getting is that I can remove the field for a specfic user role. However, the hidden field loses its saved value. How can I preserve the value while hiding the fields for specific roles?
I will inform the development team to support excluding a field based on a condition. In case of using coding, you can try to use the filter rwmb_meta_boxes to unset a field. Please get more details here https://docs.metabox.io/edit-meta-boxes/