Hence i have two array input fields like
<tbody value='question'>
<tr> <td><input type="text" name="question[one][]" ></td> <td><input type="text" name="question[one][]" >
<tr> <td><input type="text" name="question[two][]" ></td> <td><input type="text" name="question[two][]" >
</tbody>
And another is
<tbody value='answer'>
<tr> <td><input type="text" name="answer[one][]" ></td> <td><input type="text" name="question[one][]" >
<tr> <td><input type="text" name="answer[two][]" ></td> <td><input type="text" name="question[two][]" >
</tbody>
I am getting data upon submit like this.
question => array [ => "one" => array [ 'value1','value2'], "two" => array ['value1','value2']]
and
answer => array [ => "one" => array [ 'value1','value2'], "two" => array ['value1','value2']]
That is fine. This is just the data structure.
Now in the form i want to auto-complete the answer fields upon question input fields is fill up on the from. Or after complete the question fields and click on a button like use this as answer the event trigger and answer filed will filled up with the question data. And it is assure that the question and answer input field is the same format. only the name change.
I tried jQuery With The val() Method failed on undefined variable.
Please help me out!