We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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 http://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.