If your are adding fields by ajax you can do the response of the ajax with some template. For example if you have a mail field you could do:
public function executeAddMailForm($request)
{
$this->forward404unless($request->isXmlHttpRequest());
$mail = new MailForm();
//action logic...
return $this->renderPartial('addMail',array('form' => $form));
}
and make a _addMail template:
<div class="form-ajax-item">
<div class="form-ajax-label">
<?=$form['mail']->renderLabel()?>
</div>
<div class="form-ajax-field">
<?=$form['mail']->render()?>
</div>
</div>
This way you can do the ajax response using templates.
_formpartial as the main form. Form elements in symfony by default render as a table row, so this might be what is causing your confusion. Could you please tell us what you're wanting to do. - xzyfer