hi
I want to remove some fields from saving if some conditions match ... example:
public function onBeforeWrite() {
if($this->owner->salutation == 'Ms') {
unset ($this->owner->somefield);
}
parent::onBeforeWrite();
}
If users salutation = "Ms" the field "somefield" should be ignored when saving, even user changed the field ...
The sample code dont work for me.
thx