Laserfiche Forms provides two powerful automation engines within the Form Designer to create dynamic, responsive forms: Field Rules (for dynamic visual/form behavior) and Lookup Rules (for dynamic database/data integration).
⚡ 1. Field Rules
Field Rules dynamically alter the behavior, visibility, and requirements of form fields based on user input or field selections.
⚙️ Supported Rule Actions
When specified conditions are met (IF), Field Rules can trigger the following actions (THEN):
|
Action |
Details |
|---|---|
|
Show / Hide: |
Displays or conceals fields or entire sections. |
|
Require / Optional: |
Dynamically toggles mandatory input validation. |
|
Read-Only / Editable: |
Locks fields to prevent modifications or unlocks them for input. |
|
Enable / Disable: |
Activates or grays out actionable fields. |
|
Skip to Page: |
Redirects users to a specific page in multi-page forms based on their selections. |
🔧 How to Configure a Field Rule
-
Open your form in the Form Designer and click the Rules tab in the top navigation bar.
-
Select Field Rules from the left pane and click + Add Rule.
-
Set a descriptive Rule Name (e.g.,
Show IT Hardware Options). -
Define the Condition (IF):
-
Select a target field variable (e.g.,
varDepartmentType). -
Select an operator (
equals,contains,is filled,is greater than, etc.). -
Specify the comparison value (e.g.,
IT).
-
-
Define the Action (THEN):
-
Select the action (e.g.,
Show). -
Select the target field(s) or section(s) (e.g.,
varRequestedHardware).
-
-
(Optional) Toggle Else logic to automatically reverse the action when conditions are not met.
EXAMPLE RULE LOGIC:
IF varDepartmentType == "IT"
THEN Show varRequestedHardware AND Require varRequestedHardware
ELSE Hide varRequestedHardware AND Make Optional varRequestedHardware
⚠️ Best Practice: Avoid creating conflicting field rules where two separate rules attempt to control the same field simultaneously (e.g., Rule A shows a field while Rule B hides it).
Also, you can apply field rules by simply click on any Field within your form and follow these instructions
-
Click on Rules on the right panel
-
Click on Field Rules
-
Click the +Add Rule button
-
Set the Field rules explained above
🔍 2. Lookup Rules
Lookup Rules auto-populate form fields by querying external SQL databases, internal data tables, or web services based on a trigger field entered by the user.
💡 Common Use Cases
|
Use Case |
Description |
|---|---|
|
Autofilling employee information |
Autofilling employee information ( |
|
Populating dropdown choices |
Populating dropdown choices dynamically based on a prior selection (e.g., selecting |
|
Querying dynamic data |
Querying dynamic inventory rates or budget codes in real time. |
🔖 How to Configure a Lookup Rule
-
Open the form in the Form Designer and select the Rules tab.
-
Select Lookup Rules from the left pane and click + Add Rule.
-
Name your lookup rule (e.g.,
Lookup Employee Details). -
Select Data Source: Choose your configured database connection and specify the target database view/table.
-
The main Data Source used for Forms is LF_CustomTables
-
If you need a table/view built, please reach out to twolf@conroeisd.net and explain what columns you need for the table/view.
-
-
Configure Trigger & Input Parameters (Lookup Criteria):
-
Select the form variable that triggers the lookup (e.g., when
varEmployeeIDchanges). -
Map the form variable to the database column (e.g.,
DB_Employee_ID = varEmployeeID).
-
-
Configure Output Parameters (Fill Fields):
-
Map database result columns to the target form variables:
-
|
Database Column |
Form Variable |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Also, you can apply lookup rules by simply click on any Field within your form and follow these instructions
-
Click on Rules on the right panel
-
Click on Lookup Rules
-
Click the +Add Rule button
-
Set the Lookup rules as explained above
🗂 Table & Collection Lookups
Lookup rules can also populate entire Tables or Collections in a single execution:
|
Type |
Details |
|---|---|
|
Single-Row Lookups: |
Fill standard individual fields. |
|
Multi-Row Lookups: |
Query a dataset returning multiple records and dynamically generate new rows in a form Table or Collection (e.g., pulling all open tasks assigned to a selected project). |
💡 Pro-Tip: Always index your lookup columns in the underlying SQL database to ensure fast form performance when running lookups against large datasets.