conditionally read-only a field and its value