1

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.

3
  • have you tried additional parameters inside? like 'url' => array('controller' => 'recipes', 'action' => 'add'). this information came from Here Commented May 9, 2014 at 6:11
  • can you post the complete form? Commented May 9, 2014 at 7:44
  • Your mentioned url seems not to match your created form. Commented May 9, 2014 at 13:03

2 Answers 2

1

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

$this->Form->create('ProductRating',array('id'=>'validateForm', 'type' => 'post'));
Sign up to request clarification or add additional context in comments.

Comments

0

Try this one

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.