function theme_range

Returns HTML for a range form element.

Parameters

$variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #min, #max, #attributes, #step.

Related topics

1 theme call to theme_range()
system_element_info in drupal/core/modules/system/system.module
Implements hook_element_info().

File

drupal/core/includes/form.inc, line 4137
Functions for form and batch generation and processing.

Code

function theme_range($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'range';
  element_set_attributes($element, array(
    'id',
    'name',
    'value',
    'step',
    'min',
    'max',
  ));
  _form_set_attributes($element, array(
    'form-range',
  ));
  $output = '<input' . new Attribute($element['#attributes']) . ' />';
  return $output;
}