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.
精彩评论