We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Form, how to pass the values to another action | Forum

Fernando Valle
Fernando Valle Feb 17 '14
I have a controller wih a form, I added:

$form->setMethod(Form::METHOD_POST);        

$form->setEnctype(Form::ENCTYPE_MULTYPART_FORMDATA);

$form->setAction("results");


How I can retrieve the data in the new action? I cant access to $form. 


Index action and results action are in the same controller, so when I call submit everything restart in the class.


Thanks.

The Forum post is edited by Fernando Valle Feb 17 '14
ross Team
ross Feb 17 '14
Topic was moved from General Questions.
Fernando Valle
Fernando Valle Feb 17 '14
Where can I search how form do the post and how retrieve this? please help, I spent all the day on this.


I read the skeleton example of forms, but POST is managed in index, how could I redirect to other action with 


$this->redirectToAction("result");


and saving $form values with


OW::getSession()->set("VALUES_FORM_KEY", $form->getValues());


it is right? I tried bu doesnt work :/ cause it doesnt redirect me to result

The Forum post is edited by Fernando Valle Feb 17 '14
Arash
Arash Feb 27 '14
I think I've seen some kind of $_post handeling in init.php, but I'm veery new to oxwall.
Daisy Team
Daisy Mar 12 '14
Fernando, I suggest to check the Blogs plugin. Please go to /ow_plugins/blogs/controllers/save.php file and search for the $form = new SaveForm($post); string. Here you can see how the redirect to the result works.
The Forum post is edited by Daisy Mar 12 '14