0

i have the below form : I would like to send the array and get if it is possible via url or with another way.

<form name="form" id="form" method="get" action="www.example.com" enctype="multipart/form-data" onsubmit="window.location.href = 'www.example.com/goods:' + document.getElementsByClassName('goods').value;  return false;" autocomplete="off">
    <input name="goods[]" type="text" id="<?=$goods['id']?>" class="goods" value="" />
    <input name="goods[]" type="text" id="<?=$goods['id']?>" class="goods" value="" />
    <input name="goods[]" type="text" id="<?=$goods['id']?>" class="goods" value="" />
    <input name="goods[]" type="text" id="<?=$goods['id']?>" class="goods" value="" />
    <input name="goods[]" type="text" id="<?=$goods['id']?>" class="goods" value="" />

    <input name="submit" type="submit" class="submit" value="submit" />
</form>

can i send the array (goods[] values) via onsubmit redirect link? i would like to use GET method but i cant make it.

example

onsubmit="window.location.href = 'www.example.com/goods:' + document.getElementsByClassName('goods').value;  return false;"
DMande
  • 321
  • 1
  • 7
  • 18

0 Answers0