# Buttons & Actions

Buttons and Actions are core interaction mechanisms in **ONEWEB Smart Forms**.\
They define **what users can do** on a form and **how the system responds** to those actions—ranging from saving data to triggering processes or executing custom logic.

This section explains the different types of **Buttons** and **Actions** supported by **App Designer**, and when each should be used.

***

### Buttons

**Buttons** represent **user‑initiated actions** on a Smart Form.\
App Designer supports **three types of Button configurations**, each serving a different scope.

***

#### Entity Button

**Entity Buttons** perform actions that apply to the **entire Smart Form (Entity)**.

Typical use cases include:

* Save / Update entity data
* Search records
* Cancel, Reject, or Reset the form
* Trigger entity‑level database operations

Entity Buttons are usually placed near the **top or bottom of the form** and affect the overall form state.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FF5wuWQe4XWInefbtDwkd%2Fimage.png?alt=media&#x26;token=23df2be6-025c-47df-a881-7488087ecca9" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Example of Entity Buttons</em></p>

***

#### Module Button

**Module Buttons** apply actions only to a **specific 1‑Many module** and do not affect the entire entity.

Typical use cases include:

* Add a new record to a 1‑Many module
* Update or delete selected rows
* Save or cancel changes within the module

Module Buttons are commonly used inside **child modules** such as item lists or related records.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2Fv5iNT0tEHdorwL7QnclT%2Fimage.png?alt=media&#x26;token=792a6305-cca3-4df3-887b-71aae030b320" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Example of Module Buttons</em></p>

***

#### Process Button

**Process Buttons** connect Smart Forms to **business processes or Microflows**.

Typical use cases include:

* Submit form data to start a workflow
* Trigger approval processes
* Invoke backend automation logic

Process Buttons act as the bridge between **UX/UI** and **process execution**.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FEv9ktSS3teV1C0AjycSY%2Fimage.png?alt=media&#x26;token=1b8ce074-41db-43f4-b17b-744f14c900c3" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Example of Process Button</em></p>

***

{% hint style="info" %}
**Note:** For a complete list of Button configuration properties, refer to the **Buttons** section in\
**Chapter 8 – App Designer Reference**.
{% endhint %}

***

### Actions

**Actions** are extensibility hooks provided by **App Designer** that allow developers to attach **custom logic** to Smart Forms.

Actions can be used to:

* Override default save or update behavior
* Inject custom Java or JavaScript logic
* Extend form behavior beyond configuration

There are **two types of Actions**, based on scope.

***

#### Entity Action

**Entity Actions** apply to the **entire Entity**.

Key characteristics:

* Can attach **Java classes** to override save, update, or entity‑level behavior
* Cannot attach JSP files
* Used for entity‑wide business logic

Entity Actions are suitable when logic must apply consistently across the entire form.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F5Fcl0gjcXyrNCseb17qa%2Fimage.png?alt=media&#x26;token=8f286f5d-bc51-4dbd-bc23-f6dd2e39faa8" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Example of Entity Action</em></p>

***

#### Module Action

**Module Actions** apply only to a **specific module**.

Key characteristics:

* Can include **custom JSP files**
* Can attach **Java classes** to override add, update, or save behavior
* Can use **JavaScript** to customize module‑level interactions

Module Actions are ideal for extending behavior within **1‑Many modules** or specialized UI sections.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F3PtgJsinqFCZqhyZKWOd%2Fimage.png?alt=media&#x26;token=4124594a-8006-42bd-a52b-4e951afc73c3" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Example of Module Action</em></p>

***

{% hint style="info" %}
**Note:** For full configuration details of Actions, refer to the **Actions** section in\
**Chapter 8 – App Designer Reference**.
{% endhint %}

***

### Design Perspective

As part of **Smart Form best practices**:

* Use **Entity Buttons** for form‑level actions
* Use **Module Buttons** for localized data manipulation
* Use **Process Buttons** to integrate with workflows
* Apply **Actions** only when configuration alone is not sufficient

Keeping button scope and action scope clear helps maintain **predictable behavior** and **clean design**.


---

# 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/building-apps/ui-page-designer/ux-ui-components/smart-forms/buttons-and-actions.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.
