public function render($name, $value = array(), $attributes = array(), $errors = array())
 {
     $choices = $this->widget->getChoices();
     $multiple = $this->widget->getOption('multiple');
     $html = '';
     $type = $multiple ? 'checkbox' : 'radio';
     $value = is_array($value) ? $value : array($value);
     foreach ($choices as $index => $label) {
         $widget = new sfWidgetFormInput(array('type' => $type), array('value' => $index));
         $widget->setParent($this->widget->getParent());
         $attributes = array();
         if (in_array($index, $value)) {
             $attributes['checked'] = "checked";
         }
         $html .= sprintf('<label class="checkbox inline">%s %s</label>', $widget->render($name, $index, $attributes), $label);
     }
     return $html;
 }