i have this simple html form:
<form action="test/" method="get" accept-charset="utf-8">
<input type="text" name="first" value="" id="first">
<input type="text" name="second" value="" id="second">
<input type="text" name="third" value="" id="third">
<p><input type="submit" value="Continue →"></p>
</form>
when user click submit button, i want to get friendly URL like this:
http://www.site.com/test/first/second/third
how can i do this?
Where the user ends up after filling out the form and clicking “Continue” depends on what you set the
actionattribute in yourformtag to. You’ve currently set it totest/.If you want them to end up at
test/<first_val>/<second_val>/<third_val>/, then you can either use some JavaScript (per pythonFoo’s answer), or you can redirect in the view thattest/points to, usingHttpResponseRedirect: