Rikesh
Rikesh

Reputation: 26431

Passing argument in cakephp

I have to pass arguments in url after clicking on the search button. for eg. my search action is reports but when i select a radio button it send like reports/1 or reports/2 etc.

Right now I am trying to do something like this.

echo $form->create('competitors', array('url' => array_merge(array('action' => 'reports'), $this->params['pass'])));

Thanks in advance.

Upvotes: 0

Views: 167

Answers (1)

dogmatic69
dogmatic69

Reputation: 7585

what is wrong with that? it should work. you can also add $this->Form->hidden(...) to pass it in the form.

Upvotes: 1

Related Questions