Core Concepts¶
Understanding the core entities in Advanced Forms is essential for building effective solutions. The hierarchy is Form Packs > Forms (Form Types) > Sections > Elements.
Forms (Form Types)¶
A Form Type (often just called a "Form") is the basic unit of data collection. It represents a single document or questionnaire.
Structure¶
- Sections: Logical groupings of questions. Sections can be shown or hidden based on conditional logic.
- Elements: The actual questions or content blocks (fields, HTML instructions) within a section.
Form Settings¶
- Active: Determines if the form is available for use.
- Valid For Days: Defines how long a draft or entry remains valid. Useful for annual applications.
- Shared by Families: If enabled, members of the same family can view and edit drafts created by other family members.
- Instructions & Confirmation: Custom text displayed before starting and after submitting the form. Supports Lava.
Form Lifecycle¶
- Draft: The user has started the form but hasn't finished. Data is saved, but the form is not considered "complete".
- Submitted: The user has completed all required fields and clicked "Submit". Workflow actions typically trigger here.
Form Packs¶
A Form Pack is a collection of one or more Form Types grouped together into a single process. This is powerful for complex applications (e.g., "Volunteer Application Packet" containing "Personal Info", "Spiritual History", and "Reference Request").
Key Features¶
- Multi-Form Workflows: Users can complete multiple forms in sequence or out of order.
- Pack Options: A pre-selection screen where users can answer initial questions that might determine which forms they need to see later (via conditional logic).
- Progress Tracking: Shows a progress bar indicating how many forms in the pack have been completed.
- Shared Context: All forms in a pack are linked to a single
FormPackEntry, allowing you to report on the entire application as one unit.
When to Use Form Packs vs. Single Forms¶
- Use a Single Form for simple surveys, feedback forms, or single-page requests.
- Use a Form Pack when you have a long process that should be broken up (save & return), requires different sections to be completed by different people (future feature), or needs to trigger a single workflow only after multiple documents are gathered.
Entries¶
An Entry is the actual record of a user's submission.
Form Entries¶
- Stores the answers for a specific Form Type.
- Contains validation status (
_IsValid). - Linked to a Person Alias (the submitter).
Form Pack Entries¶
- The parent record for a Form Pack submission.
- Contains multiple child Form Entries.
- Status Values:
- Options (0): User is selecting initial options.
- Draft (1): User is working on the forms.
- Submitted (2): User has completed the entire pack.
Draft Saving and Resumption¶
Advanced Forms automatically supports saving progress. * Auto-Save: Forms save periodically as users type (depending on block configuration). * Save & Exit: Users can explicitly save their draft and return later. * Resumption: If a user returns to a form they started, the system tries to find their existing draft (based on authentication or tokens) so they don't have to start over.
Conditional Logic¶
Advanced Forms includes a powerful conditional logic engine that controls the visibility of Form Sections and Form Elements based on the answers to other questions.
Logic Structure¶
- Condition Group: A container for conditions.
- Expression Types:
- All: True if ALL conditions in the group are met (AND).
- Any: True if AT LEAST ONE condition is met (OR).
- AllFalse: True if ALL conditions are false (NOR).
- AnyFalse: True if AT LEAST ONE condition is false (NAND).
- Expression Types:
- Condition: A single rule checking a field's value.
- Subject: The field to check (e.g., "Marital Status").
- Verb: The operator (e.g., "Equal To").
- Predicate: The value to compare against (e.g., "Married").
Operators¶
There are 17 operators available to cover almost any scenario:
| Type | Operators |
|---|---|
| Comparison | Equal To, Not Equal To, Greater Than, Less Than, Greater Than Or Equal To, Less Than Or Equal To |
| String Matching | Contains, Does Not Contain, Ends With, Begins With, Matches (Regex) |
| Presence | Is Blank, Is Not Blank |
| Address | Country Is, State Is, Postal Code Is, Line 1 Is, Line 2 Is |
Usage¶
- Field Visibility: Hide the "Spouse Name" text field unless "Marital Status" is "Married".
- Section Visibility: Hide the entire "Medical History" section unless "Do you have medical conditions?" is checked.