Skip to main content
All CollectionsAdvanced
Set Form Values Action
Set Form Values Action
Justin Yan avatar
Written by Justin Yan
Updated over 3 months ago

A new powerful custom action is available for creating interactive forms is the Set Form Values action. This feature allows you and your users to dynamically populate form fields based on triggers within the app. This functionality helps streamline form management by offering a scalable and centralized way to manage field values in your app’s forms.

Click here to learn more about our Custom Action system and their triggers.

What is the Set Form Values Action?

The Set Form Values action lets you control what values appear in your form fields in response to specific user actions. Whether you're using a Create Form block (to add new data) or an Edit Form block (to update existing data), the Set Form Values action offers flexibility in pre-populating or dynamically adjusting form inputs.


Dynamic Pre-Population and Updates

While Frontly’s form blocks already allow you to set default values at the field level, the Set Form Values action provides an alternative that is more scalable, flexible and covers more use cases. This action gives you a centralized modal, where you can set multiple fields at once and make the values more dynamic based on user interactions.

Example

You have an email template generator that combines the inputs of a form block with a OpenAI Request action upon submission. Above the form you may have multiple field presets that will automatically pre-fill each field with some values. This allows the form to be pre-populated dynamically, as multiple presets in a in a set up like this would not be possible with just the field setting's default value alone.


Setup

When setting up the Set Form Values action, you'll first one to select the relevant block. Then depending on your set up, you'll either need to reference this block's field name or ID into the 'Key' section of the setup modal. With each key, you may connect a static or dynamic value to it, as shown in the example below.

Clarification: The terminology between form fields and form field-IDs can be confusing, so it's worth breaking down where each of these identifier types are used and located in Frontly.

Form Field - For standard Form blocks, their fields names should be referenced as they are displayed within their native data sources (Google Sheets, Supabase, Airtable).

Form Field ID - Standalone input fields that aren't connected to a data source. These are found within custom blocks made up various Form block types (Input, TextArea, Select, Switch)

The setup modal provides a user-friendly interface for organizing these form fields and values in one place, offering a cleaner and more efficient workflow than setting default values individually at the field level.


Clearing Form Values

In addition to setting field values, the Set Form Values action also includes a useful Clear Values toggle. This option allows you to reset or clear all fields within the form as well. This can be particularly useful in situations where you need to reset the form after a submission or clear fields based on specific conditions.

When the Clear Values toggle is enabled, all data in the designated fields will be removed when the action is triggered, giving users the flexibility to manage form content dynamically based on the logic of your app!

Did this answer your question?