Url

class Url

Provides a form element for input of a URL.

Properties:

  • #default_value: A valid URL string.

Usage example:

$form['homepage'] = array(
  '#type' => 'url',
  '#title' => $this->t('Home Page'),
  '#size' => 30,
  ...
);

Plugin annotation

@FormElement("url")

Hierarchy