# Data Table Attach Form

{% hint style="info" %}
**Block Information**

Available in: Page Flow

Toolbox Category: Widget - Data Table

Block Type: [Regular](/app-editor/page-flow/block-anatomy.md#regular-block)
{% endhint %}

The [Data Table](/app-editor/page-editor/built-in-elements/data-table.md) widget uses a default generic form for adding or editing records to the attached [Database Table](/app-editor/data/database-tables.md).

The **`Data Table Attach Form`** block allows you to use your own form for adding and/or editing records.

<div align="left"><figure><img src="/files/YlXgEUY1omBA7xGxekUz" alt="" width="296"><figcaption><p>Data Table Attach Form block</p></figcaption></figure></div>

The block consists of the following (from top to bottom):

* *Data Table*: [Selectable Input](/app-editor/page-flow/block-anatomy.md#selectable-input) to choose the [Data Table](/app-editor/page-editor/built-in-elements/data-table.md) widget from your page.
* *Usage*: [Dropdown configuration setting](/app-editor/page-flow/block-anatomy.md#dropdown) for choosing when your custom form needs to be used:
  1. New and Edit: Use the form for both adding and editing records.
  2. New: Use the form only for adding records.
  3. Edit: Use the form only for editing records.
* *Form Slug*: [Input](/app-editor/page-flow/block-anatomy.md#input) configuration setting to specify the [URL slug](/app-editor/page-settings.md#page-url) of the form to be shown.
* *Title*: [Input](/app-editor/page-flow/block-anatomy.md#input) configuration setting to specify the title to use.

{% hint style="success" %}
NOTE: To use a different form for adding and editing records, use this block twice, specify the appropriate form, and select the *Usage* configuration setting.
{% endhint %}

***

## Usage Example

The image below shows an example of the Data Table Attach Form block where the *EmployeeForm* is used for both adding and editing records.

<div align="left"><figure><img src="/files/zrfpI7L0RejLBAQ2cgz4" alt="" width="556"><figcaption><p>Example of Data Table Attach Form block</p></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-table-attach-form.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
