Form Elements

Learn how to add and configure form elements in Knack to create, update, and connect records in your Live App.

What You'll Learn

This article explains how forms work in Knack, showing you how to set them up for different purposes like creating new records, updating existing data, or linking related information. You'll discover how to customize form appearance, control field inputs, implement business logic with rules, and create seamless workflows for your users.

What are forms?

A form element is used to add or modify a record in your application. This means creating a new record or making changes to an existing record from a table within your application.

What do forms look like in a Live App?

Fields from your tables are used as form inputs in the Live App.


Managing Forms

Adding a Form

To add a form, click the "Add Element" button in the toolbar at the top of any page. This opens the toolbox where you can select the type of element to add.

Once you've selected the form element, you'll have the option to customize which table records the form will work with.

📘

Tip

Adding, editing, and deleting elements are managed the same way regardless of element type. To learn how to add, edit, and delete form elements from your app, see About Elements.

Adding a Form to Create a New Record

Once you've chosen the form element type, you'll be prompted to select the records the form will interact with. To create new records, select the "add a new record" option and choose a table.

Adding a Form to Update Existing Records

You can add a form to update an existing record on any details or edit record page.

Once you've chosen the form element type, select the "update a record" option and choose a table.

📘

Tip

To learn more about using action links to add details and edit pages, see our article here.

Adding a Form to Insert a Connected Record

If your application uses connections, you can add forms to insert connected records onto any details page. Once you've determined the form type and record table, you'll be prompted to specify how the record will connect within your application.

You can also add a form that creates a record connected further down the chain. For example, even if Project is the page's source table, the form can create a new Task record connected to a Milestone that's connected to the Project.

Copying or Moving a Form

To copy your form, select the ellipses icon at the top of the element and choose whether to move or copy it to another page.

To rearrange the layout of your page, click and drag the form element to move it above or below other elements.

📘

Note

Elements can only be copied or moved to pages with the same parent table or a connected table.

Form Settings

To access the settings of a form element, hover over the element and click the pen icon at the top. This opens options for Settings, Add Inputs, Rules, and Emails in the toolbox to the left of the page preview.

You can also view the source of the form above the settings, which shows the records the form interacts with.

Settings

The Settings section contains options to change the submit button text, the reload form text, the title and description, and the option to enable e-commerce.

Submit Button Text

You can customize the text on the submit button. By default it's set to "Submit."

Reload Form Text

After a user submits a form, you can display text that allows them to reload the form. This lets you customize what they see.

Title and Description

This section lets you personalize the title and description for the form element. The title appears above the element in your Live App, and the description appears below the title to give users context on how to use it.

Add Inputs

This section determines which fields are included in the form. You can include fields from tables in your app or static fields like title/copy and dividers.

📘

Note

By default, all fields are automatically added as form inputs when adding a new form. However, if you add a new field in the Data section of the Builder for your table, you'll need to manually add it to any form where you want it included.

Adding Form Inputs

The left menu provides a list of available fields that can be added as inputs. Select a field to include it in your form.

Fields can only be added once. Any fields already included in your form will appear grayed out in the left-side list.

You can also create new fields for your table directly from the Add Form Inputs section.

Adding Connection Field Inputs

Connection fields can be added to forms by selecting them from the field list.

In a form, a many-to-one or one-to-one connection field displays as a dropdown with dynamic search. A many-to-many connection field lets you select more than one record at a time.

Static Inputs

Forms offer static input options including title/copy and dividers. Select the static content option in the Inputs menu's Static tab to add them.

The Title/Copy option lets you insert titles and text throughout your form. The Divider option adds a horizontal divider to create sections within your form.

Input Layouts

You can change the layout of your inputs to display in one, two, or three columns. Field inputs can be rearranged by clicking and dragging them into the desired position.

When dragging a form input, a black line appears showing where the input will land. Fields can be dragged horizontally into columns or vertically to reorder them.

Editing Inputs

To edit an input, hover over the field and click the pen icon. The toolbox reveals options specific to that input type.

  • Field: The name of the field.
  • Read Only: Displays the field's value without allowing edits. Only available on edit forms.
  • Label: The label that displays with the input. Defaults to the field name.
  • Instructions: Additional instructions for the input. Displays in smaller text below the input, except for paragraph fields where it displays above.

Custom Options

Multiple-choice and connection fields have options to allow users to create new choices directly from the form. This presents the user with a "+" icon to add options right from the form.

When this option is selected for a connection field, it creates a child form managed in the Pages section of the Builder.

When this option is selected for a multiple-choice field, no child form is created. The user sees a modal popup to add that new option in the Live App.

Connections have an additional option. When you have multiple connection fields on a form that are connected to one another, you'll see an option to limit which connected records are available to select from.

For example, if you have Milestones connected to a Project record, you can limit the Milestones shown to only those connected to the form's selected Project. When a specific Project is selected, only that Project's Milestones appear in the Milestone field.

Connection Field Filters

Connection fields can also have filters that further limit which connected records are available to select from.

This lets you determine exactly which records appear in your connection field. For example, if you only want to display Project Managers with an "active" user status, apply a filter for that.

📘

Note

Connection field filters use AND logic — all filters must be true for a record to appear in the dropdown.

Deleting Inputs

Hover over a field input and select the trashcan icon to delete it.

Form Element Rules

You can add powerful workflows to your forms with four types of form rules: submit actions, display rules, email actions, and record actions.

📘

Rule execution order

Form rules are triggered in the following order: display rules, then record actions, then submit actions.

Submit Actions

Submit actions determine what happens after a form is submitted and what message or redirect the user sees. Each form has one submit action by default that shows a confirmation message.

📘

Submit Actions control navigation and messages, not data

Submit Actions determine where users go after a form submits and what message is shown. They don't update, insert, or delete any records. To trigger data changes on form submission, use Record Actions.

There are five actions that can occur once a submit action is triggered:

  • Show a confirmation message: The form fades out and confirmation text appears. Options include showing a link to reload the form or automatically reloading it.
  • Redirect to the parent page: The user is redirected to the parent page. Useful when adding a child record and wanting to return to the parent list.
  • Redirect to an existing page: The user is redirected to a selected page in the app.
  • Redirect to another website's URL: The user is redirected to an external URL.
  • Redirect to a new child page: A new child page is created for the user to land on. You can add any elements you wish to this page and it will automatically work with the form's record.

When: The criteria that trigger the submit action. The first rule is the default and triggers when no other rule is met. You can add multiple criteria based on field values — all must be true.

📘

Tip

To learn more about using submit actions, see Form Submit Actions.

Display Rules

Display rules control how the form is displayed. You can show and hide form inputs and change input labels based on field values on the current form record. Rules are checked and triggered when a user changes a value on the form, or when an edit form is initially populated.

⚠️

Display rules only reference fields on the same record

Display rules can only reference fields that exist on the current form. They can't reference values from a parent record or a connected table. If you need logic based on a connected record's value, see Display Rules for alternative approaches.

A display rule is added by defining the conditions that "Run when the following criteria are true" and the actions that "Then do the following."

Run when the following criteria are true: the conditions that trigger the actions. More than one condition can be added — all must be true for the action to fire.

Do the following: the action to apply when the condition is met:

  • Dynamically show — Shows the field when the condition is true and automatically hides it when the condition is no longer met.
  • Dynamically hide — Hides the field when the condition is true and automatically shows it when the condition is no longer met.
  • Rename label — Changes the field label when the condition is true.
  • Show — Shows the field when the condition is true. Doesn't reverse automatically when the condition changes.
  • Hide — Hides the field when the condition is true. Doesn't reverse automatically when the condition changes.

Multiple conditions and actions can be added for each rule using the "+" button.

📘

Tip

A great use case is adding an "Other" or "Comments" field for multiple-choice fields. When the user selects "Other," the display rule shows a text input to gather more information. The additional field needs to exist in your table before it can be added to the form.

To learn more about using display rules, see Display Rules.

Record Actions

Record actions add or update records in your database when a form is submitted. For example, you can insert or update a connected record or update the record the form is working with.

A record action is added by defining an action and the conditions (When) that trigger it.

Action: The action to take when the rule is triggered:

  • Update this (the form's) record: Useful for setting status or workflow fields on submission. You can also assign logged-in users to track who submitted a form.
  • Update connected records: Similar to "update this record," but updates records connected to the form's record.
  • Insert a connected record: Adds a new record connected to the form record. Your form's table must be connected to other tables for this option to be available. Useful for adding history, version, or archived records based on the submission.

When: The criteria to trigger the rule. Add criteria based on one or more form values, or run the rule for every form submission. All criteria must be true.

Values: When inserting or updating records, set one or more values for those inserts and updates. Values can be set to:

  • Connected value: A field from a record connected to the form record.
  • Custom value: A manually entered value.
  • Form value: One of the form inputs.
📘

Tip

To learn more about using record actions, see Record Actions.

Email Actions

You can trigger emails to be sent after a form is submitted — for example, to receive an email each time a form is submitted or to send a confirmation to the user who filled it out.

Action: Choose the kind of email to send:

  • Send a custom email for each record: Customize your email contents and recipients.
  • Send a basic email notification: Send an email containing all form inputs to an email address of your choice.

When: The criteria to trigger the email. Add criteria based on one or more form values, or send on every submission. All criteria must be true.

Email to send:

  • From: The name and email address the recipient sees as the sender.
  • Recipients: A custom email address or an email field within the table used by the form. Options include To, CC, BCC, and Reply-To.
  • Subject: The subject line. You can include form field values.
  • Message: The body of the email, combining your own text with any fields available in the form record.

There are four template variables you can add to your message body:

  • Record ID: The internal ID for the record. Useful for adding a link to edit or view the specific record.
  • Page URL: The URL for the form where the email is originating from.
  • Parent Page URL: The URL for the form's parent page, if one exists.
  • Payment Summary: A summary of the payment when e-commerce is enabled on the form.
📘

Note

HTML can be added directly to a custom email for additional formatting options. To learn more, see our article on email actions.

Using Forms in Your App

Form elements are generally used to add or update records in your tables. However, they have additional uses as well.

Equations and Calculators

Forms can be used as online calculators by adding equation fields. If all source fields used in an equation are present on the same form, the equation updates automatically as users fill it out.

This works for simple equations where all source fields are on the same form record. Current limitations include:

  • Only numeric equations calculate live in forms. Date-based equations don't.
  • All source fields for the equation must be present on the form.
  • Equations that reference other equations display inconsistent results — there's no guaranteed processing order.
  • If an equation uses values from a connected record in another table, it won't update live in the form. It calculates after the form is submitted and the record is saved.

Notes and Troubleshooting

How do I add a new field to my form? If you need to add a new field that doesn't exist yet, you'll first need to add it to a table within your app. See the Adding Form Inputs section to learn more.

What happens if I change the field name used in my form? If you change the field name in the table, every existing input label will update unless the form input label has been changed to something different.

Can I copy a form layout? You can copy a form or link to an existing form if you need to reuse it elsewhere in your app.

Why can't I add a formula field to my form element? Formula fields are not available to add to form elements. This includes all formula field types: sum, min, max, average, and count.