Krishna
Krishna

Reputation: 1540

Cakephp Form create add url as query string

When we use below method it adds url as query string

$this->Form->create('ProductRating',array('id'=>'validateForm'));

we get this url "/products/review_reply/17?url=products%2Freview_reply%2F17"

How to prevent adding url as query string ?

Any help will be appreciated.

Upvotes: 1

Views: 1013

Answers (2)

Harman
Harman

Reputation: 1753

Try this one

  echo $this->Form->create('Model', array(
        'url' => array('controller' => 'products', 'action' => 'review_reply'),
        'id'=>'abc',
        'type'=>'post'
    ));

Upvotes: 0

kaklon
kaklon

Reputation: 2432

This is strange, try to force the form type as so:

$this->Form->create('ProductRating',array('id'=>'validateForm', 'type' => 'post'));

Upvotes: 1

Related Questions