- Messages
- 7
- Likes
- 0
- Points
- 1
This issue worked with the [insert_php] method, but not with the Woody snippets.
Graphical view on web, see attached file
----------------------------------
I have following form, where the fields are generated with javascript (js):
<form method='GET' action='my-result'>
<input type='text' name='firstname[]'>
<input type='text' name='lastname[]'>
<input type='button' value='Add a text field' onClick='myFunctionAddRow()' />
</form>
---------------------------------
In my file my-result I call the values of the input files:
$author_firstname = $_REQUEST['firstname'];
$author_lastname = $_REQUEST['lastname'];
and wanted to write them out
echo $author_firstname[0]; (the value of the field was passed)
echo $author_firstname[1]; (the value of the field was not passed)
echo $author_lastname[0]; (the value of the field was passed)
echo $author_lastname[1]; (the value of the field was not passed)
The text input fields that were not generated by javascript, here ....[0]), were passed to the my-result file
The text input fields that were generated by javascript, here ....[1]), were NOT passed to the my-result file
.................................................
I also tried to save several values of fields - NOT generated by js - into an array. All these values were passed. So not the array is the problem.
So there is something with the woody snippet which does not work with the javascript, generating rows ?
And again, the javascript, that generated rows, worked with the [insert_php] method.
Thanks so much for your suggestions.
Graphical view on web, see attached file
----------------------------------
I have following form, where the fields are generated with javascript (js):
<form method='GET' action='my-result'>
<input type='text' name='firstname[]'>
<input type='text' name='lastname[]'>
<input type='button' value='Add a text field' onClick='myFunctionAddRow()' />
</form>
---------------------------------
In my file my-result I call the values of the input files:
$author_firstname = $_REQUEST['firstname'];
$author_lastname = $_REQUEST['lastname'];
and wanted to write them out
echo $author_firstname[0]; (the value of the field was passed)
echo $author_firstname[1]; (the value of the field was not passed)
echo $author_lastname[0]; (the value of the field was passed)
echo $author_lastname[1]; (the value of the field was not passed)
The text input fields that were not generated by javascript, here ....[0]), were passed to the my-result file
The text input fields that were generated by javascript, here ....[1]), were NOT passed to the my-result file
.................................................
I also tried to save several values of fields - NOT generated by js - into an array. All these values were passed. So not the array is the problem.
So there is something with the woody snippet which does not work with the javascript, generating rows ?
And again, the javascript, that generated rows, worked with the [insert_php] method.
Thanks so much for your suggestions.
Attachments
-
104.2 KB Views: 51