# Fields

**Fields** are the UI input components used within a **Module layout** to capture, display, or manipulate user data in Smart Forms.\
They represent the **interaction layer** between end users and the underlying Entity data.

Fields can be **dragged and dropped** into module layouts and arranged according to the form design requirements.

***

### Purpose of Fields

Fields are used to:

* Capture user input
* Display stored data
* Control user interaction and validation
* Bind UI components to database columns
* Facilitate data search, selection, and upload

Each field type serves a specific purpose depending on the nature of the data and how users should interact with it.

***

### Supported Field Types in ONEWEB

ONEWEB supports a wide range of field types to cover common business and data‑entry scenarios.

| Field Type         | Description                                                                                         |
| ------------------ | --------------------------------------------------------------------------------------------------- |
| **Text Box**       | Used to enter text or numeric values                                                                |
| **Label**          | Displays static text on the screen with rich text formatting                                        |
| **Hidden**         | Stores hidden values not visible to users (commonly used for keys or internal logic)                |
| **Text Area**      | Used for long text input (typically more than 100 characters)                                       |
| **Radio Button**   | Allows selection of **one** option from multiple choices                                            |
| **Checkbox**       | Allows selection of **one or more** options                                                         |
| **Listbox**        | Displays a static list of predefined values in a dropdown                                           |
| **Dynamic List**   | Displays a dropdown populated dynamically from a database table; values can depend on another field |
| **Popup**          | Opens a searchable popup window showing data from a database table                                  |
| **Calendar**       | Used to select date values                                                                          |
| **Suggestion Box** | Suggests values dynamically as the user types; supports keyword search                              |
| **No Object**      | Displays a custom value not mapped to any database column                                           |
| **Multi Select**   | Allows selection of multiple values from a list                                                     |
| **Upload**         | Used to upload and attach files                                                                     |

***

### Relationship Between Fields and Modules

Fields **must always belong to a Module**.

* Fields **cannot** exist independently on an Entity screen
* A Module must be created first
* Rows and columns must be defined within the Module
* Only then can fields be added to the layout

This ensures a clear relationship between:

* UI layout
* Database schema
* Data persistence logic

***

{% hint style="info" %}
**Important Note**\
Fields can only be dragged and dropped **inside Entity Modules**.

You must:

1. Create or select a Module
2. Define rows and columns in the Module layout
3. Then add Fields into the Module

Fields **cannot** be placed directly onto the Entity without a Module.&#x20;
{% endhint %}

***

### Field Usage Considerations

When adding and configuring fields, consider:

* The **data type** of the underlying database column
* Whether the field is **mandatory or optional**
* Validation requirements (length, format, uniqueness)
* Dependency on other fields (e.g. cascading dropdowns)
* User experience and form usability

Choosing the correct field type helps ensure:

* Accurate data entry
* Better user experience
* Cleaner and more maintainable forms

***

### Summary

**Fields** are the fundamental UI components used to interact with Entity data in ONEWEB Smart Forms.

Key points:

* Fields capture, display, or control user input
* They must be placed within a Module
* ONEWEB supports a wide variety of field types
* Field selection impacts usability and data quality
* Proper field usage ensures robust and user‑friendly Smart Forms

Correct use of Fields, together with well‑designed Modules and Entities, results in **scalable, maintainable, and business‑aligned applications**.


---

# 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.onewebstack.com/designer-reference/app-designer/entity/create-new-entity/fields.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.
