We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

form action to clean url from select

This is probably stupidly simple, but I'm having trouble with it.

I'd like to use a select list in a form to go to a url:

<form method="get" action="dir/view/">
<select name="id">
    <option value="12">Component name here</option>
<input type="submit" value="Go" />

I'd like the form to go to dir/view/12, etc., not dir/view/?id=12. What's the best way to accomplish this?



Javascript, you can do this in several ways, e.g https://jsfiddle.net/joL8558n/


Yeah -- I was hoping there was a non-js way of doing it, but couldn't find any, apart from a dispatcher redirect behind the scenes.