What's the best way to create a Form

Hi all,

I am pretty new to Yii.

I am reading the documentation and I found that is possible to create Forms in two different ways.

The first one is to use an helper class and write HTML code.

The second is to write php code and then call a render method.

What’s the best way between the first and the second ?

Cheers.

            warxsg

it depends what you mean by the "best". CActiveForm is a wraper for CHtml helper class so either way is good. Now if you rely a lot on ajax validation probably you should go with CActiveForm.

hope this helps