Because it's not "id_apartamento", it is "yourformname[id_apartamento]". Check the generated html source for the exact name, also, you can overwrite it in the forms construct() method this way: `$this->widgetSchema->setNameFormat("thisiswheretheformnamecomes[%s]");`, where %s will be filled in with the current widgets name.
On Mon, Jun 8, 2009 at 08:01, Reynier Perez Mira<rper...@uci.cu> wrote: > > Hi every: > I have this two methods in my class: > > public function executeFiltrarPorApartamentoForm(sfWebRequest $request) { > $this->form = new TbPorApartamentoForm(); > $this->setTemplate('porApartamento'); > } > > public function executeFiltrarPorApartamento(sfWebRequest $request) { > echo 'Entering'; > die ($request->getParameter('id_apartamento')); > > $pager = new sfPropelPager('TbReservacion', > sfConfig::get('app_cantidad_reservaciones_por_pagina')); > > $pager->setCriteria(TbReservacionPeer::VisitantesPorApto($request->getParameter('id_apartamento'))); > $pager->setPage($request->getParameter('page'), 1); > $pager->init(); > $this->reservaciones = $pager; > $this->setTemplate('porApartamentoListar'); > } > > And the 'porApartamento' template have this code: > <form action="<?php echo url_for('@visitantes_por_apartamento_execute') ?>" > method="post" class="formulario_login"> > <fieldset> > <legend><?php echo __('filtrar') ?></legend> > <ul> > <li><?php echo __($form['id_apartamento']->renderLabel()), > $form['id_apartamento'] ?></li> > </ul> > <p><input type="submit" value="<?php echo __('go') ?>" size="20" /></p> > </fieldset> > </form> > > The route definition for @ visitantes_por_apartamento_execute is as follow: > > visitantes_por_apartamento_execute: > url: /reservacion/filtrar/por_apartamento/execute > param: { module: reservacion, action: FiltrarPorApartamento } > > Why when I send the form the value 'id_apartamento' is always empty? What's > wrong here? > Regards, > Ing. Reynier Pérez Mira > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---