I am not sure I fully understand what you are trying to do.
All disabled fields do not appear in the posted data, so on the server side you can find out if a field was disabled like this: if(!isset($_POST[‘myobject’][‘myfield’])) { // field was disabled }
Of course a user can still manipulate the POST data and set a field that you disabled.
If you only have a few different cases then you could use scenarios.
In one scenario you include all your fields in safeAttributes() in the other scenario you only include the fields that are not disabled. In your controller you have to set the scenario following the condition for disabling fields. You could also have some logic in the safeAttributes() function.
it is definitely a READ ONLY field, NOT disabled. I kinda ducked that bullet with another solution, passing a hidden value which is set to TRUE if the fields are LOCKED.
I was just curious if there is a thing like:
$this -> getAttribute( 'field_name' ) -> options[ 'readOnly' ]; // which would return TRUE or FALSE