BruceBrute
BruceBrute

Reputation: 33

How to set cakephp edit form custom url?

HI, im accessing my edit_view using the url

/controller/action/group_id/id

but when i check my action it is only using

/controller/action/id

i have already tried using the following.

$params = array('url' => array('controller' => 'controller','action'=> 'action',$group_id,$id))
$this->form(model,$params)

$params = array('url' => '/controller/action/group_id/id')
$this->form(model,$params)

but its still not working.

Thanks

Upvotes: 1

Views: 5944

Answers (1)

pawelmysior
pawelmysior

Reputation: 3250

Don't really know what $this->form() is, but try:

echo $this->Form->create('SomeModel', array(
  'url' => array(
    'controller' => 'controller', 
    'action' => 'action', 
    $param_1, 
    $param_2
    )
  ));

Upvotes: 6

Related Questions