I have a search field with name attribute q, and after a click on the submit button I want the form to go to the same page, (which is index.php) so I set the action of the form like this :
'index.php?a=nl&b=search'.
I want that the url that is navigated to is like this (so the action-url + the name of the field):
'index.php?a=nl&b=search&q=search-term'.
However after a click the page navigates just to
'index.php?q=search-term'
Is there a way to fix this ?
Make the form method as GET and add fields as hidden fields.
looks like your form has only
qinput field (and a submit button without name attrib). Add the ones you want to append to the url after submit as hidden inputs – ex:….. rest of the form …