function content_form($content_type)
 {
     parent::html_form();
     global $thinkedit;
     if (isset($thinkedit->config['content'][$content_type])) {
         $this->content_type = $content_type;
     } else {
         trigger_error('invalid content type');
     }
     // form is valid at first
     $this->valid = true;
     // init fields
     $config = $thinkedit->config;
     foreach ($config['content'][$this->content_type]['field'] as $field_id => $field_data) {
         //echo $field_id;
         $field = $thinkedit->newField($this->content_type, $field_id);
         // init field content
         if ($this->isSent()) {
             if (isset($_REQUEST[$field_id])) {
                 $field->set($_REQUEST[$field_id]);
             }
             $field->handleFormPost();
             if (!$field->validate()) {
                 $this->valid = false;
             }
         }
         $this->fields[$field->getId()] = $field;
     }
 }