You are here

function theme_numberfield in Elements 6

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

Returns HTML for a numberfield form element.

Parameters

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

File

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

Code

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