library/core/class.form.php
public function Radio($FieldName, $Label = '', $Attributes = FALSE) {
      $Value = ArrayValueI('Value', $Attributes, 'TRUE');
      $Attributes['value'] = $Value;
      $FormValue = $this->GetValue($FieldName, ArrayValueI('Default', $Attributes));
      
      // Check for 'checked'
      if ($FormValue == $Value) 
         $Attributes['checked'] = 'checked';
      
      // Never display individual inline errors for this Input
      $Attributes['InlineErrors'] = FALSE;
      
      // Get standard radio Input
      $Input = $this->Input($FieldName, 'radio', $Attributes);
      
      // Wrap with label
      if ($Label != '') {
         $Input = '<label for="' . ArrayValueI('id', $Attributes, $this->EscapeID($FieldName, FALSE)) . 
            '" class="RadioLabel">' . $Input . ' ' . T($Label) . '</label>';
      }
      
      return $Input;
   }
public function Radio($FieldName, $Label = '', $Attributes = FALSE) {
      $Value = ArrayValueI('Value', $Attributes, 'TRUE');
      $Attributes['value'] = $Value;
      $FormValue = $this->GetValue($FieldName, ArrayValueI('Default', $Attributes));
      
      // Check for 'checked'
      if ($FormValue == $Value) 
         $Attributes['checked'] = 'checked';
      
      // Never display individual inline errors for this Input
      $Attributes['InlineErrors'] = FALSE;
      
      // Get standard radio Input
      $Input = $this->Input($FieldName, 'radio', $Attributes);
      
      // Wrap with label
      if ($Label != '') {
         $Input = '<label for="' . ArrayValueI('id', $Attributes, $this->EscapeID($FieldName, FALSE)) . 
            '" class="RadioLabel">' . $Input . ' ' . T($Label) . '</label>';
      }
      
      return $Input;
   }
public function Radio ( $ FieldName , $ Label = '' , $ Attributes = FALSE ) { $ Value = ArrayValueI ( 'Value' , $ Attributes , 'TRUE' ) ; $ Attributes [ 'value' ] = $ Value ; $ FormValue = $ this -> GetValue ( $ FieldName , ArrayValueI ( 'Default' , $ Attributes ) ) ; // Check for 'checked' if ( $ FormValue == $ Value ) $ Attributes [ 'checked' ] = 'checked' ; // Never display individual inline errors for this Input $ Attributes [ 'InlineErrors' ] = FALSE ; // Get standard radio Input $ Input = $ this -> Input ( $ FieldName , 'radio' , $ Attributes ) ; // Wrap with label if ( $ Label != '' ) { $ Input = '<label for="' . ArrayValueI ( 'id' , $ Attributes , $ this -> EscapeID ( $ FieldName , FALSE ) ) . '" class="RadioLabel">' . $ Input . ' ' . T ( $ Label ) . '</label>' ; } return $ Input ; }
Returns XHTML for a radio input element.

Provides way of wrapping Input() with a label.

@param string $FieldName Name of the field that is being displayed/posted with this input.
It should related directly to a field name in $this->_DataArray.
@param string $Label Label to place next to the radio.
@param array $Attributes Associative array of attributes for the input (e.g. onclick, class).
Special values 'Value' and 'Default' (see RadioList).
@return string
Returns XHTML for a radio input element .