I can get a parameter('id' for example) by $request->getParameter('id');
but if I use a form to POST the id, how could I get its value? $request->getParameter('id'); doesn't work.
I can get a parameter('id' for example) by $request->getParameter('id');
but if I use a form to POST the id, how could I get its value? $request->getParameter('id'); doesn't work.
sfWebRequest has getPostParameter(name, default)
In the Form, the Post Parameter Name is (by default): Model[colum name]
For example:
<input type="text" id="user_email" name="user[email]">
In the Action (after post):
$request->getPostParameter('user[email]');
Note: $request is the type sfWebRequest
© 2022 - 2024 — McMap. All rights reserved.