开发者

Zend_Form filters rewrite or route - I want a readable URL

I have a form created with Zend_Form and I would like to setup a Route for the submission, so that instead of the user NOT seeing his URL change OR seeing the URL change to a complicated GET string, it will change to reflect the filters.

BAD: /products

BAD: /products?color=white&size=large

GOOD: /products/white/large

GOOD: /products/color/white/size/large

Is 开发者_StackOverflowthere any way to accomplish this?


Not directly via Zend_Form, because at the end Zend_Form draws a HTML Form, and the browser sends it encoded in a URL form.

What you need to do is catch the submit event via Javascript and manually create the URL you want and use window.location to transfer the form.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜