I have a dynamically generated number of rows containing text boxes in a table with a default value (order\_quantity). Basically on a post I want my items table in sql to be updated with the values of these text boxes according to their ID's.

```
{% for i in items %}
        <tr>
            <td>
                ...
            </td>
            <td>
                ...
            </td>
            <td>
                <div class="form-group">
                    <input type="number" id="amount" name="amount"  value="{{ i.order_quantity }}">
                </div>
            </td>
            <td>
             ...
             </td>
        </tr>
        {% endfor %}

```

There's no problem passing in the order\_quantity OR the item ID but not both obviously.

HTML:

```
<input type="number" id="amount" name="amount"  value="{{i.item_id}} {{ i.order_quantity }}">

```

Python:

```
amount = request.form.getlist('amount')
print amount
for i in amount:
    print i

```

In summary, how can I pass both the quantity and its relative id out in a simplistic manner for easy server-side extraction for each text box?