Hi, I've been pulling my hair out for a few hours trying to get this to work - I want to post all variables from an observable array to another php page and decided the way to do it is with hidden inputs and data binding, and using and $index to produce all the names of variables to pass (formagentname0, formagentname1, formagentname2 etc)
This is my code:
<form id="submitagents" name="sendem" method="post" action="details.php">
<table>
<!-- Todo: Generate table body -->
<tbody data-bind="foreach: seats">
<tr>
<td data-bind="text: name"></td><input type="hidden" data-bind="attr: { "name": "formagentname" + $index(), value: name}">
<td data-bind="text: agency"></td><input type="hidden" data-bind="attr: { "name": "formagencyname" + $index(), value: agency}">
</tr>
</tbody>
</table>
<button type="submit">Submit</button>
</form>
It does not seem to send any fields to details.php
Any help would be greatly appreciated :)
H McA