> For the complete documentation index, see [llms.txt](https://developers.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.docstudio.com/api-documentation/template-api/template-dynamic-fields-api/dynamic-table-api.md).

# Dynamic Table API

Use this page to add a repeatable table to template HTML. Dynamic tables let recipients add rows during envelope filling.

### Dynamic table example

```html
<div class="editor-table-field-wrapper">
    <table class="table-stripped" name="items" roleId="fd8cb669-db1d-41e1-8f6c-2ad3f8fa981a" autoNumbering="true" iterable="true">
        <colgroup>
            <col width="325.5px"/>
            <col width="325.5px"/>
        </colgroup>
        <thead>
            <tr>
                <th><div class="editor-div">Item</div></th>
                <th><div class="editor-div">Quantity</div></th>
            </tr>
        </thead>
        <tbody>
            <tr iterable="true" name="*">
                <td>
                    <div class="editor-div">
                        <field type="text" name="item_name" roleId="fd8cb669-db1d-41e1-8f6c-2ad3f8fa981a"/>
                    </div>
                </td>
                <td>
                    <div class="editor-div">
                        <field type="number" name="item_qty" roleId="fd8cb669-db1d-41e1-8f6c-2ad3f8fa981a"/>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>
```

### Required attributes

* `name` — table name. Use 1 to 128 characters. Do not use `&`, `"`, `<`, or `>`. Keep the value unique within one document.
* `roleId` — role identifier for the recipient who fills the table.

### Fixed table values

* `class` — use `table-stripped`.
* `iterable` — use `true` on the table element.
* `iterable="true" name="*"` on the row marks the repeatable row template.

### Optional attributes

* `autoNumbering` — set to `true` to number the rows automatically. The default value is `false`.

### Related topics

* [Template Dynamic Fields API](/api-documentation/template-api/template-dynamic-fields-api.md)
* [Text Field API](/api-documentation/template-api/template-dynamic-fields-api/text-field-api.md)
* [Number Field API](/api-documentation/template-api/template-dynamic-fields-api/number-field-api.md)
* [Fill Envelope](/api-documentation/envelope/fill-envelope.md)
