Public Member Functions | |
init () | |
run () | |
error ($model, $attribute, $htmlOptions=array(), $enableAjaxValidation=true) | |
errorSummary ($models, $header=null, $footer=null, $htmlOptions=array()) | |
label ($model, $attribute, $htmlOptions=array()) | |
labelEx ($model, $attribute, $htmlOptions=array()) | |
textField ($model, $attribute, $htmlOptions=array()) | |
hiddenField ($model, $attribute, $htmlOptions=array()) | |
passwordField ($model, $attribute, $htmlOptions=array()) | |
textArea ($model, $attribute, $htmlOptions=array()) | |
fileField ($model, $attribute, $htmlOptions=array()) | |
radioButton ($model, $attribute, $htmlOptions=array()) | |
checkBox ($model, $attribute, $htmlOptions=array()) | |
dropDownList ($model, $attribute, $data, $htmlOptions=array()) | |
listBox ($model, $attribute, $data, $htmlOptions=array()) | |
checkBoxList ($model, $attribute, $data, $htmlOptions=array()) | |
radioButtonList ($model, $attribute, $data, $htmlOptions=array()) |
Static Public Member Functions | |
static | validate ($models, $attributes=null, $loadInput=true) |
Definition at line 120 of file UActiveForm.php.
UActiveForm::checkBox | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders a checkbox for a model attribute. This method is a wrapper of CHtml::activeCheckBox. Please check CHtml::activeCheckBox for detailed information about the parameters for this method.
Definition at line 484 of file UActiveForm.php.
UActiveForm::checkBoxList | ( | $model, | |
$attribute, | |||
$data, | |||
$htmlOptions = array() |
|||
) |
Renders a checkbox list for a model attribute. This method is a wrapper of CHtml::activeCheckBoxList. Please check CHtml::activeCheckBoxList for detailed information about the parameters for this method.
Definition at line 517 of file UActiveForm.php.
UActiveForm::dropDownList | ( | $model, | |
$attribute, | |||
$data, | |||
$htmlOptions = array() |
|||
) |
Renders a dropdown list for a model attribute. This method is a wrapper of CHtml::activeDropDownList. Please check CHtml::activeDropDownList for detailed information about the parameters for this method.
Definition at line 495 of file UActiveForm.php.
UActiveForm::error | ( | $model, | |
$attribute, | |||
$htmlOptions = array() , |
|||
$enableAjaxValidation = true |
|||
) |
Displays the first validation error for a model attribute. This is similar to CHtml::error except that it registers the model attribute so that if its value is changed by users, an AJAX validation may be triggered.
CModel | the data model |
string | the attribute name |
array | additional HTML attributes to be rendered in the container div tag. Besides all those options available in CHtml::error, the following options are recognized in addition:
|
boolean | whether to enable AJAX validation for the specified attribute. Note that in order toe enable AJAX validation, both enableAjaxValidation and this parameter must be true. |
Definition at line 305 of file UActiveForm.php.
UActiveForm::errorSummary | ( | $models, | |
$header = null , |
|||
$footer = null , |
|||
$htmlOptions = array() |
|||
) |
Displays a summary of validation errors for one or several models. This method is very similar to CHtml::errorSummary except that it also works when AJAX validation is performed.
mixed | the models whose input errors are to be displayed. This can be either a single model or an array of models. |
string | a piece of HTML code that appears in front of the errors |
string | a piece of HTML code that appears at the end of the errors |
array | additional HTML attributes to be rendered in the container div tag. |
Definition at line 368 of file UActiveForm.php.
UActiveForm::fileField | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders a file field for a model attribute. This method is a wrapper of CHtml::activeFileField. Please check CHtml::activeFileField for detailed information about the parameters for this method.
Definition at line 462 of file UActiveForm.php.
UActiveForm::hiddenField | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders a hidden field for a model attribute. This method is a wrapper of CHtml::activeHiddenField. Please check CHtml::activeHiddenField for detailed information about the parameters for this method.
Definition at line 429 of file UActiveForm.php.
UActiveForm::init | ( | ) |
Initializes the widget. This renders the form open tag.
Definition at line 239 of file UActiveForm.php.
UActiveForm::label | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders an HTML label for a model attribute. This method is a wrapper of CHtml::activeLabel. Please check CHtml::activeLabel for detailed information about the parameters for this method.
Definition at line 396 of file UActiveForm.php.
UActiveForm::labelEx | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders an HTML label for a model attribute. This method is a wrapper of CHtml::activeLabelEx. Please check CHtml::activeLabelEx for detailed information about the parameters for this method.
Definition at line 407 of file UActiveForm.php.
UActiveForm::listBox | ( | $model, | |
$attribute, | |||
$data, | |||
$htmlOptions = array() |
|||
) |
Renders a list box for a model attribute. This method is a wrapper of CHtml::activeListBox. Please check CHtml::activeListBox for detailed information about the parameters for this method.
Definition at line 506 of file UActiveForm.php.
UActiveForm::passwordField | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders a password field for a model attribute. This method is a wrapper of CHtml::activePasswordField. Please check CHtml::activePasswordField for detailed information about the parameters for this method.
Definition at line 440 of file UActiveForm.php.
UActiveForm::radioButton | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders a radio button for a model attribute. This method is a wrapper of CHtml::activeRadioButton. Please check CHtml::activeRadioButton for detailed information about the parameters for this method.
Definition at line 473 of file UActiveForm.php.
UActiveForm::radioButtonList | ( | $model, | |
$attribute, | |||
$data, | |||
$htmlOptions = array() |
|||
) |
Renders a radio button list for a model attribute. This method is a wrapper of CHtml::activeRadioButtonList. Please check CHtml::activeRadioButtonList for detailed information about the parameters for this method.
Definition at line 528 of file UActiveForm.php.
UActiveForm::run | ( | ) |
Runs the widget. This registers the necessary javascript code and renders the form close tag.
Definition at line 252 of file UActiveForm.php.
UActiveForm::textArea | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders a text area for a model attribute. This method is a wrapper of CHtml::activeTextArea. Please check CHtml::activeTextArea for detailed information about the parameters for this method.
Definition at line 451 of file UActiveForm.php.
UActiveForm::textField | ( | $model, | |
$attribute, | |||
$htmlOptions = array() |
|||
) |
Renders a text field for a model attribute. This method is a wrapper of CHtml::activeTextField. Please check CHtml::activeTextField for detailed information about the parameters for this method.
Definition at line 418 of file UActiveForm.php.
|
static |
Validates one or several models and returns the results in JSON format. This is a helper method that simplies the way of writing AJAX validation code.
mixed | a single model instance or an array of models. |
array | list of attributes that should be validated. Defaults to null, meaning any attribute listed in the applicable validation rules of the models should be validated. If this parameter is given as a list of attributes, only the listed attributes will be validated. |
boolean | whether to load the data from $_POST array in this method. If this is true, the model will be populated from $_POST[ModelClass] . |
Definition at line 545 of file UActiveForm.php.
Referenced by ProfileController\actionChangepassword(), and ProfileController\actionEdit().