Skip to main content
System: Forms & Workflow (FW)
Feature: Form Builder (FW-01)
Created: 2025-01-27
Updated: 2025-12-05
Status: ✅ Complete

Quick Reference

✅ When to Use Forms:

  • You need to collect data from users
  • Data is captured one time (form submission)
  • You need validation, conditional logic, or workflows
  • You need form submissions tracked over time
  • You need surveys, assessments, or reports

❌ When NOT to Use Forms:

  • You need a new entity type to track over time → Use Custom Objects (PF-24)
  • You need to extend an existing entity → Use Custom Fields (PF-16)
  • You need to control existing entity forms → Use Entity Field Configuration (PF-17)
  • You need entity CRUD operations → Use Custom Objects (PF-24)

Decision Tree


What Are Forms?

Forms are data capture interfaces that allow users to input data, which is then stored as form submissions. Forms support:
  • Multiple field types (text, number, date, select, file, signature, etc.)
  • Validation rules
  • Conditional logic (show/hide fields)
  • Multi-page layouts (FW-05)
  • Workflow integration (FW-03)
  • Submission tracking and analytics (PF-09)
Storage: Form submissions stored in fw_form_submissions table.

Common Use Cases

Use Case 1: Resident Intake Form

Scenario: New resident intake collecting personal information, medical history, and emergency contacts. Solution: Create a form (FW-01) Why Forms:
  • One-time data capture (each submission is a new intake)
  • Needs validation (required fields, date ranges)
  • Needs conditional logic (show medical fields if medical needs = yes)
  • Needs workflow (submit → review → approve)
Implementation:
  1. Create form in Form Builder
  2. Add fields: name, date_of_birth, medical_needs (yes/no), emergency_contact
  3. Add conditional logic: show medical_history if medical_needs = yes
  4. Add validation: date_of_birth must be in past
  5. Publish form → Users fill form → Submission created → Workflow triggered
Not Custom Objects Because:
  • Not tracking multiple records over time
  • Intake is a process, not an entity

Use Case 2: Incident Report Form

Scenario: Staff need to report incidents (safety, compliance, etc.) Solution: Create a form (FW-01) Why Forms:
  • One-time data capture (each submission is a new incident)
  • Needs validation (required fields, date/time)
  • Needs workflow (submit → investigate → resolve)
  • Needs submission tracking
Implementation:
  1. Create form with: incident_type, date_time, location, description, severity
  2. Add file upload for evidence
  3. Add workflow: on submit → notify manager → create task
  4. Publish form

Use Case 3: Daily Inspection Checklist

Scenario: Daily facility inspection checklist Solution: Create a form (FW-01) Why Forms:
  • Repeated submissions (daily, weekly)
  • Yes/No or pass/fail fields
  • Can generate compliance reports
Implementation:
  1. Create form with checkbox fields for each inspection item
  2. Add signature field for inspector
  3. Set up recurrence (daily reminder via workflow)
  4. Use Form Analytics (PF-09) for compliance reporting

Examples by Module

Recovery Housing (RH)

Workforce (HR)

Finance (FA)

Governance (GR)


Field Types Available


Form Options (Inline)

Use when: Options are specific to THIS form only

Picklists (PF-15)

Use when: Options are used across multiple forms

Lookups (FW-15)

Use when: Options come from database tables

Integration with Workflows (FW-03)

Forms integrate seamlessly with the Automation Engine:
Common Workflow Patterns:
  1. Approval Workflow: Submit → Route to approver → Approve/Reject → Notify submitter
  2. Notification Workflow: Submit → Notify stakeholders → Archive
  3. Data Sync Workflow: Submit → Map to entity → Create/update record

Anti-Patterns to Avoid

❌ Using Forms for Entity Extension

Problem: Creating a form to capture employee badge number
Why Bad: Badge number belongs on employee record, not form submission
Solution: Use Custom Fields (PF-16) to add badge_number to hr_employees

❌ Using Forms Instead of Custom Objects

Problem: Creating a form to track clinical licenses
Why Bad: Licenses need CRUD operations, not one-time submissions
Solution: Use Custom Objects (PF-24) for license entity

❌ Using Inline Options for Reusable Values

Problem: Adding “Full-time, Part-time, Contractor” as inline options
Why Bad: Same values needed in multiple places, hard to maintain
Solution: Use Picklists (PF-15) for reusable dropdown values

❌ Using Forms for Database Records

Problem: Creating form to add new departments
Why Bad: Departments need CRUD in hr_departments table
Solution: Use module-specific entity forms or Raw Data Editor (PF-25)

Best Practices

1. Form Design

  • Keep forms focused (one purpose per form)
  • Group related fields with sections
  • Use conditional logic to hide irrelevant fields
  • Provide clear labels and help text

2. Field Validation

  • Set required fields appropriately
  • Use correct field types (email for emails, etc.)
  • Add character limits for text fields
  • Validate formats (phone, date, etc.)

3. Workflow Integration

  • Define clear approval paths
  • Set up appropriate notifications
  • Configure escalation for overdue approvals
  • Test workflow before production use

4. Data Management

  • Consider data retention policies
  • Set up appropriate RLS for submissions
  • Use Form Analytics (PF-09) for insights
  • Archive old forms when no longer needed


Last Updated: 2025-12-05