Set a model value to emtpy with afterFind

Hi Folks,

I’m using an afterFind function in a model to set a view default values.

I would like to set a field to be empty (blank) even when populated , but when I set the variable to empty (as below) I still see the email.

$this->email = ‘’;

I can still see the email.

Any help would be appreciated.

yes you can do,

just set that model attribute balue as null before rander page as,





this will rander page with value attribute null.

[b]Note: when you rander page the field will show empty and if you want to save the form it will show empty field validation, and if you not use field as require take care as it will not overwrite with empty value.

On back button it will ok, the field remains same as before.[/b]