I have created a form w开发者_运维百科ithin the layout which is intended to be used across the site as a search box - The problem is that whenever the form is submitted the request string is appended to the existing URL
Any help in this regard will be appreciated
Regards, Bert
I think your problem is the "setAction" Method, because it is missing your baseUrl!.
If you want to submit your request with GET Method try this:
 $view = $this->getView();
 $baseUrl = $view->baseUrl();
 $this->setAction($baseUrl . '/categorey/listproducts');
If you want to submit your request with POST Method try this:
 $view = $this->getView();
 $baseUrl = $view->baseUrl();
 $this->setAction($baseUrl . '/categorey/listproducts');
 $this->setMethod('POST');
Altough you could override the "setAction" Method from Zend_Form and set baseUrl to your action by default.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论