1 form.inc | theme_range($variables) |
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, #placeholder, #required, #attributes, #step.
Related topics
File
- core/
includes/ form.inc, line 4705 - 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', 'placeholder'));
_form_set_class($element, array('form-range'));
$output = '<input' . backdrop_attributes($element['#attributes']) . ' />';
return $output;
}