TbHtml::urlField PHP Method

urlField() public static method

Generates an url field input.
See also: self::textInputField
public static urlField ( 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 urlField($name, $value = '', $htmlOptions = array())
    {
        return self::textInputField('url', $name, $value, $htmlOptions);
    }

Usage Example

Example #1
0
 public function testUrlField()
 {
     $I = $this->codeGuy;
     $html = TbHtml::urlField('url', 'http://www.getyiistrap.com', array('class' => 'input'));
     $input = $I->createNode($html, 'input[type=url]');
     $I->seeNodeAttributes($input, array('class' => 'input', 'id' => 'url', 'name' => 'url', 'value' => 'http://www.getyiistrap.com'));
 }
TbHtml