TbHtml::activeNumberField PHP Method

activeNumberField() public static method

Generates a number field input for a model attribute.
See also: self::activeTextInputField
public static activeNumberField ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model.
$attribute string the attribute.
$htmlOptions array additional HTML attributes.
return string the generated input field.
    public static function activeNumberField($model, $attribute, $htmlOptions = array())
    {
        return self::activeTextInputField('number', $model, $attribute, $htmlOptions);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Renders a number field for a model attribute.
  * @param CModel $model the data model.
  * @param string $attribute the attribute.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated input field.
  * @see TbHtml::activeNumberField
  */
 public function numberField($model, $attribute, $htmlOptions = array())
 {
     return TbHtml::activeNumberField($model, $attribute, $htmlOptions);
 }
All Usage Examples Of TbHtml::activeNumberField
TbHtml