TbHtml::rangeField PHP Method

rangeField() public static method

Generates a range field input.
See also: self::textInputField
public static rangeField ( string $name, string $value = '', array $htmlOptions = [] ) : string
$name string the input name.
$value string the input value.
$htmlOptions array additional HTML attributes.
return string the generated input field.
    public static function rangeField($name, $value = '', $htmlOptions = array())
    {
        return self::textInputField('range', $name, $value, $htmlOptions);
    }

Usage Example

Exemplo n.º 1
0
 public function testRangeField()
 {
     $I = $this->codeGuy;
     $html = TbHtml::rangeField('range', 3.33, array('class' => 'input'));
     $input = $I->createNode($html, 'input[type=range]');
     $I->seeNodeAttributes($input, array('class' => 'input', 'id' => 'range', 'name' => 'range', 'value' => '3.33'));
 }
TbHtml