Lock a dropdown field for a specific role (for nsinelnikov)
-
Hi nsinelnikov,
in registration form (which assigns “patient” role) I have e dropdown to choose doctor name.
Doctors list in drop down is retrieved from the function:function doctors_dropdown_list() { $users = get_users(array( 'meta_key' => 'last_name', 'role' => 'um_doctor', 'orderby' => 'meta_value', )); foreach ( $users as $user ) { $user_names[$user->display_name] = $user->display_name; } return $user_names; }
then called back in the “Choices Callback” option in field, OK.
Now…when a doctor opens a patient’s profile I would like to block the dropdown so that it cannot be changed.
Practically prevent the “doctor” role from changing this field.
How can I do? Do you have anything to suggest to me?
Thanks in advance
Lion
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Lock a dropdown field for a specific role (for nsinelnikov)’ is closed to new replies.