weird thing

Hello everyone.

Can anyone tell me why when I use $model->attributes=$_POST[‘VvidForm’]; in my controller only those attributes are accepted that are mentioned in rules() in my VvidForm model that extends CFormModel?

Thanks

that’s simply by design… if you want to match all your attributes just set them as ‘safe’ inside the rules… you can look here:

http://www.yiiframework.com/doc/guide/form.model#declaring-validation-rules