Form Logic
The true value of SIFA lies in its rule-based architecture, which enables dynamic form generation that responds intelligently to user
input in real-time. This capability represents the foundational vision behind the SIFA project: developing a form engine that provides
immediate, contextual feedback during data entry rather than relying on post-submission validation.
A key differentiator in SIFA's rule system is its dual-mode approach to complexity management. For straightforward use cases,
administrators can leverage intuitive dropdown-based configurations, ensuring accessibility for users without technical expertise.
When advanced logic is required, the platform seamlessly scales to support sophisticated formula-driven rulesets, providing the
flexibility to handle complex business requirements without compromising ease of use for simpler implementations.
This approach ensures that SIFA can accommodate organizations across the technical spectrum while maintaining the core objective of
enhancing user experience through intelligent, responsive form interactions.
Dropdown Rules
The simplified dropdown rule configuration utilizes a four-parameter structure for each rule: a target question, an operation, a
comparison value, and a conditional action. This creates a straightforward logical framework where, when the specified condition
evaluates to true, the system automatically executes the designated action.
EXAMPLE: Question1 (target) is equal to (operation) "Yes" (true value) then show Question2 (action)
Formula Rules
For more complex scenarios, SIFA supports formula-based rules that allow for intricate logical expressions. These formulas can
incorporate multiple conditions, logical operators (AND, OR), and nested evaluations to create sophisticated decision-making processes.
This flexibility enables the construction of advanced rulesets that can adapt to a wide range of business logic requirements.
EXAMPLE: sifa_isFieldAnswered('pizzasize') && SIFA.answers.pizzasize == 'lrg'
This example is equivalent to If Question1 has an answer and Question1 (target) is equal to (operation) "Large" (true value)
In this example it uses a built-in SIFA function called sifa_isFieldAnswered('field_ref') which checks if the field has an answer. This is useful for dropdowns and radio buttons where there may be no answer selected.
Data Rules
The next progression of the rule engine is to incorporate a data-driven approach, allowing conditions based on data tables.
Domino's Pizza Based Demo
Domino's Pizza has updated their build your own pizza form.
This demo is based on the older version of the form but still shows how SIFA can be used to create a similar experience.
Demo Logic Explanation
The first rule is to hide or show the Crust Type field section
- Rule 1: If Pizza Size has an answer then show Crust Type
The next 3 rules are to filter the Crust Type options based on the Pizza Size selected.
- Rule 2a: If pizza size is small then show crust type [Hand-tossed, Thin, Gluten]
- Rule 2b: If pizza size is medium then show crust type [Hand-tossed, Parmesan, Pan, Thin, New York]
- Rule 2c: If pizza size is large then show crust type [Hand-tossed, Thin, New York]