Dynamically changing the user editable status of a field?
-
I want to add a field to profiles that is something like “locked?” that only admin users can edit. Then if that field is yes, then I want to change the user-editable status of other fields on the profile. Basically blocking regular users from editing them if the profile is in a locked state.
My thought is to check when profile is saved to check locked? status. If locked then change the user-editable status of fields to not editable and if not locked change to editable.
My questions are:
1. how do I hook into when the profile is being saved so I can check the state of the locked? field
2. how do I programmatically toggle the user-editable status of other fields?
- The topic ‘Dynamically changing the user editable status of a field?’ is closed to new replies.