CFormModel attributes not binded after POST


I have written my new CFormModel by copying and modifying existing CActiveRecord model.

I’ve changed everything I need, but in rules() I did not change (remove) ‘on’=>‘search’ param from safe validator.

This caused my attributes to not being bind after form submitted. After I removed this parameter everything started to work fine.

Is this a normal situation?



i have the same situation in my application. did you have any other solution other than rewriting the CformModel ?

all my attributes are assigned to safe buy yet $model->attributes mass assignment does not hold any values.

any help is highly appreciated.

Hi all.

I think the line:


only works when you do a search.

Then,you could add this line in rules and test:


Are you sure all data is send by post? You can show Firebug notice.