}
        if ($form->isCancel()) {
            echo '<div class="info">Commentaire annulé</div>';
        }
        $form->setConfirmLabel('Envoyer');
        foreach ($discussion->field as $field) {
            if ($field->getType() != 'id' && $field->isUsedIn('public')) {
                $form->add('<div>');
                $form->add($field->getTitle() . ' :');
                $form->add('<br/>');
                $form->add($field->renderUi());
                $form->add('<br/>');
                $form->add('<br/>');
                $form->add('</div>');
            }
        }
        $form->add('<div>');
        $form->add('Entrez le code ci-dessous (pour éviter les spams) :');
        $form->add('<br/>');
        $form->add('<input type="text" name="code" />');
        $form->add('<br/>');
        $form->add('<img src="' . ROOT_URL . '/lib/securimage/securimage_show.php">');
        $form->add('<br/>');
        $form->add('</div>');
        echo $form->render();
        ?>


<?php 
    }
}
 function render()
 {
     global $thinkedit;
     if (isset($this->content_type)) {
         $config = $thinkedit->config;
         foreach ($this->fields as $field) {
             //if ($field->isUsedIn($this->use) && $field->getType() <> 'id')
             if ($field->getType() != 'id') {
                 $this->add('<div class="te_field">');
                 $this->add('<div class="te_field_title">');
                 if ($field->isRequired() || $field->isTitle()) {
                     $this->add('<span class="te_field_required">*</span>');
                 }
                 $this->add($field->getTitle() . ' : ');
                 $this->add('</div>');
                 if ($field->getHelp()) {
                     $this->add('<div class="te_field_help">');
                     $this->add($field->getHelp());
                     $this->add('</div>');
                 }
                 if ($this->isSent() && $field->getErrorMessage()) {
                     $this->add('<div class="te_field_error">');
                     $this->add($field->getErrorMessage());
                     $this->add('</div>');
                 }
                 $this->add('<div class="te_field_ui">');
                 $this->add($field->renderUi());
                 $this->add('</div>');
                 $this->add('</div>');
             }
         }
     } else {
         trigger_error('you must define a content type to use this content_form');
         return false;
     }
     return parent::render();
 }