Yii framework Model

Hi,

In Model Generator of yii code generator, I know to create class using CActiveRecord of Model,

it’s need Database table name.[color="#FF0000"] But how to create [/color][color="#FF0000"]class using CFormModel[/color][color="#FF0000"] of Model in Yii Framework?[/color]

Thanks,

Vilas

did you had a answer???

i post the same. i am pasting the replays I got

Yes you can create a model even if you don’t have any database. If you take a look at the CModel Class Reference, you will se that CModel has 2 subclasses :

  • CActiveRecord : this one is used to work with database
  • CFormModel : this one is used to work with forms

In the explanation you’ve inserted in your post, the author refers to a CFormModel.

Hope this helps

create CFormModel

BUT I AM COMPLTLY LOST JUST TRING A CONTROLER AND A MODEL HALLOWORD

maybe i easy just copy and paste the ContactFom.php than hoping for the framework create the file and the code but i don’t know :frowning: