Everyone_Else Everyone_Else - 3 months ago 6x
jQuery Question

How to not display URI variable on redirect?

I have the following form which is used to redirect the user to search a particular date.

<form action="/datesearch/" method="get" id="goto_date_form" style="display:none;">
<input name="dt" type="text" />
<input type="hidden" name="csrfmiddlewaretoken" value="[my csrf token value]">

When this form is called with
, it does redirect the page, but it displays both the value of dt and the value of csrfmiddlewaretoken as URI variables.

i.e. when searching for 2016-07-06 it redirects to

`http://localhost:8000/datesearch/?dt=2016-07-06&csrfmiddlewaretoken=[my csrf token value]`

How can I get it to stop displaying the csrf token?


Simply change method="get" to method="post" (and also back end too)