FormLang Form Actions: Automate Tasks Based on Form Responses

FormLang form actions save you time! Automate tasks like grading quizzes, sending notifications based on responses,Define evaluation rules and let FormLang handle the rest – automatically.

For example, set up form actions in the form action workspace to:

  • Automatically grade quizzes based on your defined rules.

Explore the form action workspace below.

Form action workspace

The form action workspace is a one-stop shop for creating and editing form actions. To access the workspace, go to Create a Form Action in the design App.

As shown in Figure 1, the workspace consists of the following key features:

Form action workspace
Figure 1: Form action workspace
1. Toolbar
The toolbar at the top of the workspace has buttons for opening/creating a form action, saving the form action, and redoing/undoing recent operations.
2. Form action title
The form action title is displayed below the toolbar. Click the title to edit it.
3. Node toolbox
The left node toolbox provides five types of nodes:
  • Form node: Represents a form.
  • Evaluation node:Evaluates the form responses based on the evaluation rules you define.
  • Decision node:Makes a decision based on the results of the evaluation.
  • Feedback node:Sends a message or a new form link to the user.
  • Custom event node: Triggers a custom event.
To create a node, drag it from the toolbox and drop it on the canvas. For more information about node types, see Validating Form Actions.
4. Canvas
The canvas is the main workspace where you create and edit your form actions.
5. Property inspector
The property inspector allows you to edit the properties of the selected edge or node in the canvas.

Validating Form Actions

A form action is represented as a flowchart. To determine if your form action is valid, check its corresponding flowchart against the following rules:

  • Start with a Form Node: The first node in a form action flowchart must always be a form node. This node represents the form that will be used to collect data from respondents.
  • Valid Successors for Form Nodes: Following a form node, there are three valid types of nodes that can be placed next: an evaluation node, a feedback node, or a custom event node.
  • Evaluation Node Successors: The successor of an evaluation node must always be a decision node. An evaluation node assesses the form responses based on predefined rules, and the decision node determines the next step based on the evaluation results.
  • Decision Node Successors: A decision node can have multiple successors, representing the different paths the form action can take based on the evaluation results.
  • Valid Successors for Decision Nodes: The successors of a decision node must be either feedback nodes or custom event nodes. Feedback nodes provide responses to respondents, while custom event nodes trigger specific actions.
  • Outgoing Decision Edges: Each edge originating from a decision node represents a separate branch following the evaluation node. To define the specific condition under which this branch will be executed, click the edge and edit its properties.
  • Leaf Nodes: A feedback node is a leaf node, meaning it has no successors. This indicates that the feedback node represents the final step in the form action.
  • Custom Event Node Successors: A custom event node can be a leaf node or have a feedback node as its successor. If a custom event node is followed by a feedback node, it provides additional information to the respondent.
Example of a Valid Form Action

The figure below shows an example of a valid form action. In this case, the system evaluates the form response and, based on the evaluation result, sends one of two feedback messages to the respondent.

Valid form action example
Figure 2: Valid form action example

Evaluation methods

You can choose one of the two evaluation methods for an evaluation node:

  • Weighted scoring: Assigns a point value to each question, and the total score for the form response is calculated by adding up the points for all of the questions answered correctly. This method is useful for evaluating forms where the questions have different levels of difficulty or importance.
  • Logic evaluation: Defines a set of logic statements, each of which assesses whether a specific condition based on the form response is true or false. The overall result of the evaluation is determined by applying either the conjunctive (AND) or disjunctive (OR) operation to the individual logic statements. In other words, the form response is considered to be true only if all the logic statements evaluate to true (AND), or if at least one logic statement evaluates to true (OR).
Defining Evaluation Rules

To define evaluation rules, select the evaluation node in the canvas and then click the Edit button in the corresponding property inspector. This will open a dialog box, as shown in Figure 3, where you can select the evaluation method you want to use and then define the rules for that method.

Evaluation methods
Figure 3: Two evaluation methods
Weighted Scoring Rules

When you select weighted scoring, a dialog box, as shown in Figure 4 opens where you can define the comparative operations and assign points for each question. The system will apply these rules to the selected questions and compute the total points for the form response.

Weighted scoring rules
Figure 4: Defining the weighted scoring rules
Logic Evaluation Rules

When you select logic evaluation, a dialog box, as shown in Figure 5, opens where you can define the logic for evaluating the form response to be true or false. The system will apply this logic to the form response and determine whether it is true or false.

Logic evaluation rules
Figure 5: Defining the logic evaluation rules