Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Problems inserting in Yii framework
I assign a value to the model's property in the controller:
$model =new Post;
In my view, the visual
Beginwidget (' Cactiveform ', Array (
' id ' = ' china4a-reg-form ',
' Enableajaxvalidation ' =>false,
This way to get the values of the other fields.
The method of submission is:
Isnewrecord? ' Submit ': ' Save ');?>
But the value inside the widget can be inserted into the database correctly, but the $model->type is not plugged in.
The study of the half-day did not try to come out, how can I also insert this field record? Also please master can point pointing.
Your $model is outside (probably still touching the inside of the method) you don't pass the words, how does he know?
Yes. Your $model->type need to be submitted with other content
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.