0
<form method="GET">
    <input type="text" class="form-control" placeholder="Search" 
      name="keywords" value="{{ keywords }}">
     <button class="btn btn-primary" type="submit">Cauta</button>
</form>

my url on first click http://localhost:8090/xxxkeywords=tu on second click http://localhost:8090/xxx?keywords=tu&keywords=tu

  • after first submit your URL will be changed with query param, on the second click it will again add query param as you are submitting the form on the same page – Jatin Parmar Nov 26 '19 at 11:12
  • That should not normally happen with a GET method form, submitting overwrites the existing query string - that has even been standardized with HTML5, see https://stackoverflow.com/a/9882750/10955263 Feels like this is probably missing some important detail (JS interfering? URL rewriting of any kind in place?) – 04FS Nov 26 '19 at 11:24
  • Have you tried to set `action` on your form? – Preciel Nov 26 '19 at 14:31
  • action is the answer – Andrei Filimon Nov 27 '19 at 13:14

0 Answers0