Enterprise-grade, database-driven form builder with approval workflows and external data integration
Django Forms Workflows bridges the gap between simple form libraries (like Crispy Forms) and expensive SaaS solutions (like JotForm, Formstack). It provides:
- π Database-Driven Forms - Forms stored in database, not code
- π Approval Workflows - Multi-step approval engine with notifications
- π External Data Integration - Pull data from LDAP, databases, APIs
- π Enterprise Security - LDAP/AD authentication, complete audit trails
- π Self-Hosted - No SaaS fees, full data control
- π¨ Beautiful UI - Built on Crispy Forms and Bootstrap
Business users can create and modify forms through Django Admin without touching code:
- Drag-and-drop field ordering
- 15+ field types (text, select, date, file upload, etc.)
- Validation rules (required, regex, min/max, etc.)
- Conditional field visibility
- Custom help text and placeholders
Built-in multi-step approval engine:
- Sequential or parallel approvals
- Configurable approval logic (any/all approvers)
- Email notifications and reminders
- Complete audit trail
- Approval delegation
Automatically populate form fields from external systems with flexible, reusable configurations:
- User Model - Current user's profile data (email, name, username)
- LDAP/Active Directory - Enterprise directory attributes (department, title, manager)
- External Databases - Pull from any SQL database with custom field mappings
- REST APIs - Integrate with external services
- System Values - Current date/time, previous submissions
New in v1.1: Prefill sources are now configurable database records with:
- β Dropdown Selection - Form builders select from pre-configured sources
- β Custom Field Mappings - Configure database lookup fields for different environments
- β Reusable Configurations - Define once, use across multiple forms
- β Centralized Management - All sources managed in Django Admin
Example database prefill configuration:
# Admin β Prefill Sources β Add Prefill Source
Name: Student - First Name
Source Type: Database
DB Schema: dbo
DB Table: STBIOS
DB Column: FIRST_NAME
DB Lookup Field: ID_NUMBER # Column to match against
DB User Field: employee_id # UserProfile field to use for lookupSee Prefill Sources Guide for detailed configuration.
Automatically update external systems with form data after submission or approval:
- Database Updates - Write data back to external databases with custom field mappings
- LDAP Updates - Update Active Directory attributes
- API Calls - Send data to external services via HTTP APIs
- Custom Handlers - Execute custom Python code for complex integrations
Trigger Types:
- β On Submit - Execute immediately when form is submitted
- β On Approve - Execute when form is approved
- β On Reject - Execute when form is rejected
- β On Complete - Execute when workflow is complete
Features:
- Conditional execution based on form field values
- Automatic retries with configurable max attempts
- Error handling (fail silently or block submission)
- Execution ordering for dependent actions
- Complete audit logging
Example database update configuration:
# Admin β Post-Submission Actions β Add
Name: Update HR Database
Action Type: Database Update
Trigger: On Approval
DB Field Mappings:
[
{"form_field": "email", "db_column": "EMAIL_ADDRESS"},
{"form_field": "phone", "db_column": "PHONE_NUMBER"}
]See Post-Submission Actions Guide for detailed configuration.
- LDAP/Active Directory authentication
- Role-based permissions
- Complete audit logging (who, what, when, where)
- CSRF protection
- SQL injection prevention
- File upload validation
Track everything for compliance:
- Form creation/modification
- Form submissions
- Approval decisions
- Status changes
- Field value changes
- User actions with IP addresses
pip install django-forms-workflows- Add to
INSTALLED_APPS:
INSTALLED_APPS = [
# ...
'crispy_forms',
'crispy_bootstrap5',
'django_forms_workflows',
# ...
]- Configure settings:
# Crispy Forms
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
CRISPY_TEMPLATE_PACK = "bootstrap5"
# Forms Workflows
FORMS_WORKFLOWS = {
'ENABLE_APPROVALS': True,
'ENABLE_AUDIT_LOG': True,
'ENABLE_FILE_UPLOADS': True,
'MAX_FILE_SIZE': 10 * 1024 * 1024, # 10MB
}- Run migrations:
python manage.py migrate django_forms_workflows- Include URLs:
urlpatterns = [
path('forms/', include('django_forms_workflows.urls')),
]- Create your first form in Django Admin!
graph TB
subgraph UI["User Interface"]
FB["Form Builder<br/>(Admin)"]
FV["Form Viewer<br/>(End User)"]
AU["Approval UI<br/>(Approvers)"]
end
subgraph Django["Django Application"]
subgraph DSL["Data Source Abstraction Layer"]
LDAP["LDAP<br/>Source"]
DB["Database<br/>Source"]
API["API<br/>Source"]
end
end
subgraph External["External Systems"]
AD["Active<br/>Directory"]
Legacy["Legacy<br/>Databases"]
ExtAPI["External<br/>APIs"]
end
UI --> Django
DSL --> External
style UI fill:#e1f5ff
style Django fill:#fff4e1
style DSL fill:#ffe1f5
style External fill:#e1ffe1
Perfect for:
- HR Departments - Employee onboarding, time-off requests, expense reports
- IT Departments - Access requests, equipment requests, change management
- Finance - Purchase orders, invoice approvals, budget requests
- Education - Student applications, course registrations, facility requests
- Healthcare - Patient intake, referrals, insurance claims
- Government - Permit applications, FOIA requests, citizen services
- Installation Guide
- Configuration Guide
- Data Sources Guide
- Workflow Guide
- API Reference
- Architecture Overview
| Feature | Django Forms Workflows | Crispy Forms | FormStack | Django-Formtools |
|---|---|---|---|---|
| Database-driven forms | β | β | β | β |
| No-code form creation | β | β | β | β |
| Self-hosted | β | β | β | β |
| Approval workflows | β | β | β | |
| External data prefill | β | β | β | |
| LDAP/AD integration | β | β | β | β |
| Audit trail | β | β | β | β |
| Open source | β | β | β | β |
- Python 3.10+
- Django 5.1+
- PostgreSQL 12+ (recommended) or MySQL 8.0+
- Celery 5.0+ (for background tasks)
- Redis/Valkey (for Celery broker)
We welcome contributions! Please see CONTRIBUTING.md for details.
GNU Lesser General Public License v3.0 (LGPLv3) - see LICENSE for details.
- π Documentation
- π¬ Discussions
- π Issue Tracker
- Database-driven form definitions
- Dynamic form rendering
- Approval workflows
- LDAP integration
- Database prefill
- Audit logging
- Form builder UI (drag-and-drop)
- Conditional field visibility (client-side)
- File upload validation
- Form templates/cloning
- Dashboard analytics
- REST API for form submission
- Webhook support
- Custom field types (signature, location, etc.)
- Advanced reporting
- Form versioning
- Multi-tenancy support
- SSO integration (SAML, OAuth)
- Advanced RBAC
- White-label support
- Plugin marketplace
Built with β€οΈ by the Django community.
Special thanks to: