Hi,
i have a form inside a modal box. If i have some validation error, the
form is not showed again inside the the modal box, but in the content
area of the browser.
Any way to show the form and its validation errors inside the modal box?
Here you have my codes:
<?php echo m_link_to(
'Enviar mensaje',
'mensaje/new?receptor='.$miembro->getId().'&tipo_mensaje=0',
array('title' => ('Escribe un
mensaje a '.$miembro->getNombreApellidos())),
array('width' => 320, 'height'
=> 215)) ?>
public function executeNew(sfWebRequest $request) {
$m = new Mensaje();
$m->setSfGuardUserId($this->getUser()->getGuardUser()->getId());
$m->setReceptor($request->getParameter('receptor'));
$this->form = new MensajeAbreviadoForm($m);
}
public function executeCreate(sfWebRequest $request) {
$this->forward404Unless($request->isMethod('post'));
$this->form = new MensajeAbreviadoForm();
$this->processForm($request, $this->form);
$this->setTemplate('new');
}
protected function processForm(sfWebRequest $request, sfForm $form) {
$form->bind($request->getParameter($form->getName()));
if ($form->isValid()) {
$mensaje = $form->save();
$this->redirect('miembros/index');
}
}
<form action="<?php echo url_for('mensaje/create') ?>" method="post"
<?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
--
Javi
Ubuntu 8.04
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en