theme_radios

Definition

theme_radios($element)
includes/form.inc, line 744

Description

Format a set of radio buttons.

Parameters

$element An associative array containing the properties of the element. Properties used: title, value, options, description, required and attributes.

Return value

A themed HTML string representing the radio button set.

Related topics

Namesort iconDescription
Form generationFunctions to enable output of HTML forms and form elements.

Code

<?php
function theme_radios($element) {
  if ($element['#title'] || $element['#description']) {
    return theme('form_element', $element['#title'], $element['#children'], $element['#description'], NULL, $element['#required'], form_get_error($element));
  }
  else {
    return $element['#children'];
  }
}
?>
 
 

Drupal is a registered trademark of Dries Buytaert.