widgets/CiiActiveForm.php
public function numberFieldRow($model, $property, $htmlOptions=array(), $validators=NULL)
	{
		if ($validators !== NULL)
		{
			foreach ($validators as $k=>$v)
			{
				if (get_class($v) == "CNumberValidator")
				{
					$htmlOptions['min']  = $v->min;
					$htmlOptions['step'] = 1;
				}

				if (get_class($v) == "CRequiredValidator")
					$htmlOptions['required'] = true;
			}
		}

		$htmlOptions['value'] = $model->$property;
		$htmlOptions['type'] = 'number';
		$htmlOptions['id'] = get_class($model) . '_' . $property;
		$htmlOptions['name'] = get_class($model) . '[' . $property .']';
		echo CHtml::tag('label', array(), $model->getAttributeLabel($property) . (Cii::get($htmlOptions, 'required', false) ? CHtml::tag('span', array('class' => 'required'), ' *') : NULL));
		echo CHtml::tag('input', $htmlOptions);
	}
public function numberFieldRow($model, $property, $htmlOptions=array(), $validators=NULL)
	{
		if ($validators !== NULL)
		{
			foreach ($validators as $k=>$v)
			{
				if (get_class($v) == "CNumberValidator")
				{
					$htmlOptions['min']  = $v->min;
					$htmlOptions['step'] = 1;
				}

				if (get_class($v) == "CRequiredValidator")
					$htmlOptions['required'] = true;
			}
		}

		$htmlOptions['value'] = $model->$property;
		$htmlOptions['type'] = 'number';
		$htmlOptions['id'] = get_class($model) . '_' . $property;
		$htmlOptions['name'] = get_class($model) . '[' . $property .']';
		echo CHtml::tag('label', array(), $model->getAttributeLabel($property) . (Cii::get($htmlOptions, 'required', false) ? CHtml::tag('span', array('class' => 'required'), ' *') : NULL));
		echo CHtml::tag('input', $htmlOptions);
	}
public function numberFieldRow ( $ model , $ property , $ htmlOptions = array ( ) , $ validators = NULL ) { if ( $ validators !== NULL ) { foreach ( $ validators as $ k => $ v ) { if ( get_class ( $ v ) == "CNumberValidator" ) { $ htmlOptions [ 'min' ] = $ v -> min ; $ htmlOptions [ 'step' ] = 1 ; } if ( get_class ( $ v ) == "CRequiredValidator" ) $ htmlOptions [ 'required' ] = true ; } } $ htmlOptions [ 'value' ] = $ model -> $ property ; $ htmlOptions [ 'type' ] = 'number' ; $ htmlOptions [ 'id' ] = get_class ( $ model ) . '_' . $ property ; $ htmlOptions [ 'name' ] = get_class ( $ model ) . '[' . $ property . ']' ; echo CHtml :: tag ( 'label' , array ( ) , $ model -> getAttributeLabel ( $ property ) . ( Cii :: get ( $ htmlOptions , 'required' , false ) ? CHtml :: tag ( 'span' , array ( 'class' => 'required' ) , ' *' ) : NULL ) ) ; echo CHtml :: tag ( 'input' , $ htmlOptions ) ; }
numberRow HTML5 number elemtn to work with
@param  CiiSettingsModel $model       The model that we are operating on
@param  string           $property    The name of the property we are working with
@param  array            $htmlOptions An array of HTML Options
@param  CValidator       $validators  The Validator(s) for this property
Since we already have it, it's worth passing through
numberRow HTML5 number elemtn to work with