# Create a Form

The Create Form wizard is used to quickly create forms for adding or editing data.

{% embed url="<https://www.youtube.com/embed/PhYLKBKsgk8?autoplay=1&rel=0&vq=1080>" %}
*Create a Form*
{% endembed %}

![](/files/FKAT1dCfsFWiq0lE0Udv)

***

### Properties

![](/files/wEd0fmZQvhybrfnc1Zvx)

***

1. **Query**

   The insert or update query to use with the form.
2. **Query type**

   Insert or Update.
3. **Select Query**

   If applicable, the select query to populate your update form.
4. **Datagrid**

   If applicable, indicate a datagrid to display your data.
5. **Label**

   The label for the form field.
6. **Control**

   The type of control (field), e.g. textbox.
7. **Validations**

   The validations that must be performed on the data, e.g. required field, number validation or email validation.
8. **Read-Only**

   To make the field read-only (non-editable).
9. **Label placement**

   Indicate where the label must appear in relation to the field.
10. **Save button text**\
    The text on the form button.

![](/files/dDRShr0CFFpuNKs84fLm)

***

### How to create an update form

Assume that you have a database and that you want to provide your users with a form to update data in the database.

1. Add a Database connector to your application.
2. Add the following 3 SQL queries to the connector:
   * a query to load the DataGrid (let's name it *SelectAll*)
   * a query to load the edit form with a specific record (name it *SelectRecord*)
   * a query to update the specific record (name it *UpdateRecord*)
3. Add a [DataGrid](/controls/data-grid.md) to your page.
   * Select your *SelectAll* query to load your DataGrid columns.
4. Click Create Form on the toolbar.
   * Select your *UpdateRecord* query.
   * For Query Type, select the *Update Query* radio button.
   * To provide a select query, select your *SelectRecord* query.
   * Attach your DataGrid to the form.
     * Select the *staffID* DataGrid column for the *Source* property of the staffID key field.
   * Click Next, then click Generate.


---

# 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.stadium.software/features/create-a-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.
