I have a from with several text inputs as follows:
<input name="option[][<?php echo $cmd1; ?>]" type="text">
<input name="option[][<?php echo $cmd2; ?>]" type="text">
<input name="option[][<?php echo $cmd3; ?>]" type="text">
<input name="option[][<?php echo $cmd4; ?>]" type="text">
[..]
There is an undefined amount of inputs, each time.
When the form is submitted I want to save the value of "option[]" into a javascript array (I am using AJAX so the state of the array will not get deleted).
I have tried to achieve this with $('form').serializeArray() in my AJAX request, but I am not sure how I can access only the "option[]" data.
Any suggestions would be greatly appreciated!
option) values?