You are here

function theme_urlfield in Elements 6

Same name and namespace in other branches
  1. 7 elements.theme.inc \theme_urlfield()

Returns HTML for an urlfield form element.

Parameters

$element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #size, #maxlength, #required, #placeholder, #attributes, #autocomplete_path.

File

./elements.theme.inc, line 189
The theme include file for the elements module.

Code

function theme_urlfield($element) {
  $element['#attributes']['type'] = 'url';
  element_set_attributes($element, array(
    'id',
    'name',
    'value',
    'size',
    'maxlength',
    'placeholder',
  ));
  _form_set_class($element, array(
    'form-text',
    'form-url',
  ));
  $extra = elements_add_autocomplete($element);
  $output = '<input' . drupal_attributes($element['#attributes']) . ' />';
  $output = _elements_theme_form_element_wrapper($element, $output . $extra);
  return $output;
}