Ok, it's not a problem with sfForm, it's a problem with the docs (I
think, someone confirm this is in the docs...)
In the docs, there is an example of:
public function executeSubmit($request)
{
$this->forward404Unless($request->isMethod('post'));
$params = array(
'name' => $request->getParameter('name'),
'email' => $request->getParameter('email'),
'message' => $request->getParameter('message'),
);
$this->redirect('contact/thankyou?'.http_build_query($params));
}
If query params are empty, you hit bug 2482 (
http://trac.symfony-project.org/ticket/2482 )
If I replace it with this, it works fine:
public function executeSubmit($request)
{
$this->forward404Unless($request->isMethod('post'));
$params = array();
$fields = array('name', 'email', 'message');
foreach($fields as $field)
{
if ($request->getParameter($field))
{
$params[$field] = $request->getParameter($field);
}
}
$this->redirect('contact/thankyou?'.http_build_query($params));
}
Unfortunatly this bug has just been pushed into sf1.1.4, so.. I think
the docs need fixing here.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---