Properties

$inputTypes

$inputTypes : array

Input types (alias => TbActiveForm method name).

Type

array

$widgetOptions

$widgetOptions

$type

$type : string

The type of this input. This can be a widget class name, a path alias of a widget class name, or an input type alias (text, hidden, password, textarea, file, etc.).

If a widget class, it must extend from {@link CInputWidget} or (@link CJuiInputWidget).

Type

string

$name

$name : string

Type

string — Name of this input.

$label

$label : string

Label for this input.

Type

string

$labelOptions

$labelOptions : array

The options used when rendering label part. This property will be passed to the {@link CActiveForm::labelEx} or {@link CHtml::label} if $label is defined, method call as its $htmlOptions parameter.

Type

array

$hint

$hint : string

Hint text of this input.

Type

string

$hintOptions

$hintOptions : array

The options used when rendering hint part.

This property will be passed as $htmlOptions parameter for hint wrapper tag.

Type

array

$prepend

$prepend : string

Text/html prepended to input field.

Type

string

$prependOptions

$prependOptions : array

The options used when rendering prepend part.

This property will be passed as $htmlOptions parameter for prepend wrapper tag.

Type

array

$append

$append : string

Text/html appended to input field.

Type

string

$appendOptions

$appendOptions : array

The options used when rendering append part.

This property will be passed as $htmlOptions parameter for append wrapper tag.

Type

array

$items

$items : array

The options for this input when it is a list box, drop-down list, check box list, or radio button list.

Please see {@link CHtml::listData} for details of generating this property value.

Type

array

$errorOptions

$errorOptions : array

The options used when rendering the error part. This property will be passed to the {@link CActiveForm::error} method call as its $htmlOptions parameter.

Type

array

$enableAjaxValidation

$enableAjaxValidation : boolean

Whether to allow AJAX-based validation for this input. Note that in order to use AJAX-based validation, {@link CForm::activeForm} must be configured with 'enableAjaxValidation'=>true.

This property allows turning on or off AJAX-based validation for individual input fields. Defaults to true.

Type

boolean

$enableClientValidation

$enableClientValidation : boolean

Whether to allow client-side validation for this input. Note that in order to use client-side validation, {@link CForm::activeForm} must be configured with 'enableClientValidation'=>true.

This property allows turning on or off client-side validation for individual input fields. Defaults to true.

Type

boolean

Methods

render()

render() : string

Render this element.

Returns

string —

The rendered element.

generateGroupOptions()

generateGroupOptions() : array

Generates row options array from this class properties.

Returns

array —

The row options.

evaluateVisible()

evaluateVisible() : bool

Evaluates the visibility of this element. This method will check if the attribute associated with this input is safe for the current model scenario.

Returns

bool —

Whether this element is visible.