Using Submit Rules

This article provides a guide on how to utilize submit rules with form views in your Knack app.

This article covers the following topics:

 

What are submit rules?

Submit rules determine the destination to which the user will be directed after successfully submitting a form. This aspect is crucial for establishing workflow as it enables you to redirect users to various forms or any other accessible page within your app, or even to an external webpage if necessary.

submitrule1

 

Building Submit Rules

Submit rules can be accessed in the Settings menu of your form view. Select the Rules option under the Form Menu and then Submit Rules on the following menu:

submitrules2

 

Adding a Submit Rule

Each form will include one submit rule by default. The default rule cannot be removed.

You can add additional submit rules by clicking the "Add Rule" button below your default submit rule: 

submitrules3

 

Editing an Existing Submit Rule & Changing the Order

The criteria for your submit rule can be edited directly in the Submit Rules toolbox. You can also rearrange the order of your Submit Rules by selecting the icon on the top left corner of the rule and dragging it above or below your existing rules:

submitrules4

 

Copying a Submit Rule

You can copy existing submit rules by selecting the copy icon in the top right corner of the rule. The copy of the rule will then appear below the original rule.  

submitrules5

 

Submit Actions

There are five available actions for your submit rule. The selected action determines what happens after your form is successfully submitted.

submitrules6 

Show a Confirmation Message

After submission, the form will fade out, and the confirmation text will appear. 

There are two additional options here: 

  • Show a link to reload a form 

  • Automatically reload the form

Here is an example of a form that shows a confirmation message and includes a link to reload the form after submission:

submitrule7

Redirect to an Existing Page

Upon successful submission, the user will be directed to a designated page within your app. Submit rules have the ability to redirect users to both parent/top-level pages and any child page that utilizes the same data source as the form.

Tip:  To learn more about page types (child/parent pages), see our article here. Additionally, to learn more about the data source, see our article here

 

Redirect to the Parent Page

Upon successful submission, the user will be automatically redirected to a parent page. This is particularly useful when your form adds a child record and you want to guide your users back to a page that displays all parent records.

Examples:

  • Upon a user creating a record, they will be directed back to the parent page where they can view a grid displaying all records for that table.

  • Upon form submission, redirect the user to a page with a rich text view which serves as a "thank you" page.

 

Redirect to Another Website's URL

Upon successful submission, users have the option to be redirected to any URL of their choosing. For instance, they can be directed to an existing "thank you" page as a way to conclude their workflow.

 

Redirect to a New Child Page

This option allows you to establish a new child page to direct the user to.

You have the flexibility to incorporate any desired views on this page, and it will seamlessly integrate with the form's record. This empowers users to swiftly add a new record and be instantly redirected to the relevant views of that specific record (such as a details view).

 

When Criteria

These are the conditions that trigger the submit rule:

submitrule8

Multiple conditions can be added for each rule based on field values by clicking on the "+" button next to your rule. It is important to note that if you add multiple conditions, all of them must be true for the submit rule to trigger.

Note: Please note that you will not be able to add conditions to your first (default) submit rule.
 

Notes & Troubleshooting

  • If a submit rule does not seem to be working, make sure you don’t have a second one with the same trigger, as the second one will take precedence over the first.

  • It is important to note that you cannot add "When" conditions to your first, or default submit rule. The default submit rule will be triggered for every form submission that does not match any other submit rule.