Using Cform And Cformmodel

I really mixed up.:blink:

When should i use CForm and When CFormModel? And exact How for CForm with array instead of $model?

would this be helpful?

Thank you. It was so useful and clear.

Now How to use some extensions like datePaicker or anything else?

any more examples?





I wrote a wiki on CJuiDatePicker.

It illustrates how to use it for a text field in a form.

The first quarter of the article will be enough to get the general idea of the input widget extensions.

Thank you. so good example. Doesn’t it have any matter in usage with CHttp::form?

You mean CHtml::form?

No problem, as far as I know.

Excuse me, yes i meant that.

your right.

Any tutorial or example?

A CJuiInputWidget has 2 pairs of properties:

  1. model and attribute, and

  2. name and value

Don’t mix them. They are mutually exclusive.

The former is for CActiveForm, in which you use it in place of a CActiveForm::textField($model, $attribute, $options).

The latter is for CForm, in which you use it in place of a CHtml::textField($name, $value, $options).