-3
<form action="../index.php?option=com_rsform&formId=3" method = "get">
  <input type="hidden" name='form[Name]' value="1">
  <input type="submit" value="Submit">
</form>

and i need this result:

http://localhost/index.php?option=com_rsform&formId=3&form[Name]=1

but i get this result:

http://localhost/index.php?form%5BName%5D=1

where is the problem?

2 Answers2

0

This seems to be expected behavior regarding form actions when a combination of action URL parameters and form fields are present, and at the moment I'm not finding anything in a spec which tells otherwise.

The practical solution seems to be to just put the values you want in the form itself:

<form action="../index.php" method="get">
  <input type="hidden" name='option' value="com_rsform">
  <input type="hidden" name='formId' value="3">
  <input type="hidden" name='form[Name]' value="1">
  <input type="submit" value="Submit">
</form>
David
  • 208,112
  • 36
  • 198
  • 279
0

Check this: submitting a GET form with query string params and hidden params disappear

The GET parameters of "action" are overwrited by the form. So, the answer of David is correct.

Other solution: make a POST form and keep your URL ;)

Community
  • 1
  • 1
dimasdmm
  • 318
  • 4
  • 15