I am building a form collection and it output's the rows like this:
<input type="number" name="order[items][1][qty]">
<input type="number" name="order[items][2][qty]">
But what I want to do is have this bit:
<input type="number" name="order[items][DB_ID_1][qty]">
<input type="number" name="order[items][DB_ID_2][qty]">
DB_ID_1 would be a numeric value of the database record ID. So I can print out each row in my template like this:
{{ form.items.1 }}
So it prints the form element out for the database record with ID 1, currently it prints out the element for the key of 1 which could have the real database id of 9 for example
Any more information required please let me know. Thanks