Skip to content

Commit dd68c43

Browse files
committed
Added form actions
1 parent 5f65bb2 commit dd68c43

File tree

9 files changed

+66
-0
lines changed

9 files changed

+66
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Form Actions",
3+
"position": 3
4+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
slug: reset-form-field
3+
title: Reset Form Field [Action]
4+
tags: []
5+
description: Learn how to add Reset Form Field action in your FlutterFlow app.
6+
sidebar_position: 1
7+
---
8+
# Reset Form Field [Action]
9+
10+
This action allows you to reset a value for the Form widgets. This is helpful in clearing out any previously entered data and allows users to start fresh.
11+
12+
For example, If a form has been successfully submitted, it may make sense to clear out the form fields so that the user can enter new data if they want to submit the form again.
13+
14+
![Reset all fields for a medical appointment](../../imgs/reset-form-field-demo.gif)
15+
16+
## Adding Reset Form Field action
17+
18+
Follow the steps below to add this action to any widget.
19+
20+
1. Select the **Widget** (e.g., Button, etc.) on which you want to add the action.
21+
2. Select **Actions** from the properties panel, If it's the first action, click **+ Add Action** button. Otherwise, click the "**+**" button below the previous action tile (inside *Action Flow Editor*) and select **Add Action**.
22+
3. Search the **Reset Form Field** (under *State Management*) action and select the widget you would like to reset.
23+
24+
You can reset the same types of widgets in a single action only. e.g., multiple *TextField* widgets.
25+
26+
![Adding Reset Form Field action](../../imgs/adding-reset-action.gif)
27+
28+
:::info
29+
You can also reset form fields that are inside the components.
30+
![reset-form-field-component](../../imgs/reset-form-field-component.png)
31+
:::
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
slug: set-form-field
3+
title: Set Form Field [Action]
4+
tags: []
5+
description: Learn how to add Set Form Field action in your FlutterFlow app.
6+
sidebar_position: 0
7+
---
8+
# Set Form Field [Action]
9+
10+
This action allows you to set a value for the Form widgets. For example, you could use this action to auto-populate a form based on a user's previous submission.
11+
12+
You could also dynamically update a dropdown menu based on a user's previous selection, such as showing relevant cities based on a selected country.
13+
14+
![Auto-populating form fields from the last medical appointment](../../imgs/set-form-field-demo.gif)
15+
16+
## Adding Set Form Field action
17+
18+
Follow the steps below to add this action to any widget.
19+
20+
1. Select the **Widget** (e.g., Button, etc.) on which you want to add the action.
21+
2. Select **Actions** from the properties panel. If it's the first action, click the **+ Add Action** button. Otherwise, click the "**+**" button below the previous action tile (inside *Action Flow Editor*) and select **Add Action**.
22+
3. Search the **Set Form Field** (under *State Management*) action and select the widget you would like to set.
23+
4. Now, you can set its value directly or from a variable.
24+
25+
![Adding Set Form Field action](../../imgs/adding-set-form-field-action.gif)
26+
27+
:::info
28+
You can also set form fields that are inside the components.
29+
30+
![set-form-field-in-component](../../imgs/set-form-field-in-component.avif)
31+
:::
2.55 MB
Loading
3.84 MB
Loading
29.3 KB
Loading
246 KB
Loading
283 KB
Loading

0 commit comments

Comments
 (0)