I'm making a form which consist in some text and uploading files. The problem is that the the file is not been saved in the db (blob field) because the client didn't want to so I made a UploadFileForm to make it clean and do the logic of uploading and saving into the File Table (which has the path of that file). So i have:

```
//HistoryForm
class HistoryForm extends BaseHistoryForm
{
  public function configure()
  {
      unset($this['text']);

      $this->setWidget('text', new sfWidgetFormTextareaTinyMCE(array(
          'width'  => 550,
          'height' => 350,
          'config' => 'theme_advanced_disable: "anchor,image,cleanup,help"',)));
      $this->setValidator('text', new sfValidatorString());

      $this->embedForm('uploadfile1', new UploadFileForm());
  }
}

//UploadFileForm
class UploadFileForm extends sfForm{
    public function configure() {
        $this->setWidget('file', new sfWidgetFormInputFile());
        $this->setValidator('file', new sfValidatorFile(array(
            'required' => false,
            'path' => sfConfig::get('sf_upload_dir')
        )));

        $this->setWidget('name', new sfWidgetFormInputText());
        $this->setValidator('name', new sfValidatorString(array('required' => true)));

        $this->widgetSchema->setNameFormat('uploadfile[%s]');
    }

    public function save({data_to_be_saved}){
         //logic of saving
    }
}

```

The main problem is that embeding a doctrine form works perfectly, but if I want to save a non doctrine form the save method is never called (seems fine because not all sfForms have to be saved) but if I override the **saveEmbeddedForms** the embed sfForm isn't binded! Reading the symfony's code found out that when embeding a form what really does is appending the fields to the main widgetSchema so using the embed form is practically usless... So, what I do is making a **save** method in the sfForm which does the saving by getting all needed variables from parameters. This is call is made in the overrided method **save** of the main doctrine form:

```
//HistoryForm
    class HistoryForm extends BaseHistoryForm
    {
     ...
     public function save($con = null) {
      $hc = parent::save($con);

      foreach ($this->getEmbeddedForms() as $form) {
          $values = $this->getValue($form->getName());
          $form->save($hc, $values);
      }
  }

```

I spent all afternoon thinking and reading symfony's core code and didn't found a proper approach. So... does anyone knows (or thinks) a better approach?