theme_radios
- Versions
- 4.7 – 6
theme_radios($element)- 7
theme_radios($variables)
Theme a set of radio button form elements.
Parameters
$variables An associative array containing:
- element: An associative array containing the properties of the element. Properties used: #title, #value, #options, #description, #required, #attributes, #children.
Return value
A themed HTML string representing the radio button set.
Related topics
Code
includes/form.inc, line 1834
<?php
function theme_radios($variables) {
$element = $variables['element'];
$class = 'form-radios';
if (!empty($element['#attributes']['class'])) {
$class .= ' ' . implode(' ', $element['#attributes']['class']);
}
$element['#children'] = '<div class="' . $class . '">' . (!empty($element['#children']) ? $element['#children'] : '') . '</div>';
return $element['#children'];
}
?>Login or register to post comments 