theme_radios

  1. drupal
    1. 5
    2. 6
    3. 7
    4. 8
Versions
5 – 6 theme_radios($element)
7 – 8 theme_radios($variables)

Returns HTML for 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.

Related topics

Code

includes/form.inc, line 2736

<?php
function theme_radios($variables) {
  $element = $variables['element'];
  $attributes = array();
  if (isset($element['#id'])) {
    $attributes['id'] = $element['#id'];
  }
  $attributes['class'] = 'form-radios';
  if (!empty($element['#attributes']['class'])) {
    $attributes['class'] .= ' ' . implode(' ', $element['#attributes']['class']);
  }
  return '<div' . drupal_attributes($attributes) . '>' . (!empty($element['#children']) ? $element['#children'] : '') . '</div>';
}
?>