Bootstrapper\Form::number PHP Method

number() public method

Creates a number form element
public number ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
return string
    public function number($name, $value = null, $attributes = array())
    {
        $attributes['class'] = isset($attributes['class']) ? self::FORM_CONTROL . ' ' . $attributes['class'] : self::FORM_CONTROL;
        return parent::input('number', $name, $value, $attributes);
    }

Usage Example

Example #1
0
 /**
  * Creates a number form element
  *
  * @param string $name The name of the element
  * @param null $value
  * @param array $attributes
  * @return string 
  * @static 
  */
 public static function number($name, $value = null, $attributes = array())
 {
     return \Bootstrapper\Form::number($name, $value, $attributes);
 }