Hi,
I have a form in a template (not a eZ generated form) which posts to another eZ page. How do I get the POST variables within the template?
Thanks.
Hi,
I have a form in a template (not a eZ generated form) which posts to another eZ page. How do I get the POST variables within the template?
Thanks.
Proper way to build form form handling in EZ Publish is create form like this:
<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="DestinationURL" value="{$node.url_alias}" />
<input name="(your_parameter_name)" type="text" value="parameter value">
Where $node.url_alias alias url of current node. But you can change it on whatever you need. I am not sure if input name which you wnat as parameter to your view have to be in () but it works for me. If you do it like this, in target node template are your parameters avilable through $view_parameters object.
$view_parameters.<name of your form field>
You can get it like this :
ezhttp('my_variable_name', 'POST')
You can also retrieve get and session variables like this.
You can check the documentation page.