/**
  * FormHandler::radioButton()
  *
  * Create a radioButton on the form
  *
  * @param string $title: The title of the field
  * @param string $name: The name of the field
  * @param array $options: The options used for the field
  * @param string $validator: The validator which should be used to validate the value of the field
  * @param boolean $useArrayKeyAsValue: If the array key's are the values for the options in the field
  * @param string $extra: CSS, Javascript or other which are inserted into the HTML tag
  * @param string $mask: if more the 1 options are given, glue the fields together with this mask
  * @return void
  * @access public
  * @author Teye Heimans
  */
 function radioButton($title, $name, $options, $validator = null, $useArrayKeyAsValue = null, $extra = null, $mask = null)
 {
     require_once FH_INCLUDE_DIR . 'fields/class.RadioButton.php';
     // value has to be an array
     if (!is_array($options)) {
         trigger_error("You have to give an array as value with the radiobutton '{$name}'", E_USER_WARNING);
         return;
     }
     // create a new checkbox
     $fld = new RadioButton($this, $name, $options);
     if (!empty($validator)) {
         $fld->setValidator($validator);
     }
     if (!is_null($useArrayKeyAsValue)) {
         $fld->useArrayKeyAsValue($useArrayKeyAsValue);
     }
     if (!empty($extra)) {
         $fld->setExtra($extra);
     }
     if (!empty($mask)) {
         $fld->setMask($mask);
     }
     // register the field
     $this->_registerField($name, $fld, $title);
 }