Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Form Field Values Not Saved In Database

$
0
0
Hello everybody,

I am trying to insert a new Comment into the Comment table with the Create Controller generated by gii.
Everything works except that the form field parent_id is being ignored.
I am filling out every field and every field is being saved in the database except the field parent_id.
The field parent_id is always saved as 0 although i entered other ids.
However, when I try to assign a value directly in the Controller with $model->parent_id = 1; it works.
So somehow the value from the form isn't being transfered to $model->parent_id unlike all other fields.
Why is that so?

Any help is greatly appreciated

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>