Form Doesn't send Post

behavior

#1

I have multiple small forms to send me to different views or to call some actions in the controles, somehow everyone that calls a controller works fine, but when I try to redirect one and add a parameter it returns to the original page without any parameters set.

echo $this->Form->create(‘Form 1’, array(‘url’ => ‘/some_controller_action_set_route?parameter=’.$variable));
echo $this->Form->button(’’, array( ‘class’ => ‘btn btn-default’));
echo $this->Form->end();
echo $this->Form->create(‘Form 2’, array(‘url’ => ‘/Controller/Action?parameter=’.$variable));
echo $this->Form->button(’’, array(‘class’ => ‘btn btn-danger’));
echo $this->Form->end();

The first one doesn’t work, it automaticly sends me back to /some_controller_action_set_route but if I check the network tab of the Google Chrome DevTools it show the redirect correctly but inmediatly after it redirects.


#2

What’s your controller code?