Form Builder
The Form Builder allows administrators to create customizable form templates that control what fields appear when users create deviations, CAPAs, or audits. Each module (Deviations, CAPAs, Audits) has its own set of form templates, accessible from the corresponding admin tab.
What You Can Do
Section titled “What You Can Do”- Create new form templates with custom sections and fields
- Edit existing templates to add, remove, or reorder fields
- Set a template as the default for its module
- Clone templates to create variations without starting from scratch
- Preview how a template will appear to end users
- Download template definitions for backup or review
- Configure AI-powered field suggestions on individual fields
Accessing the Form Builder
Section titled “Accessing the Form Builder”- Navigate to Admin in the sidebar.
- Select the appropriate tab:
- Deviation Forms for deviation form templates
- CAPA Forms for CAPA form templates
- Audit Forms for audit form templates
Template List
Section titled “Template List”The main view displays a table of existing form templates with:
| Column | Description |
|---|---|
| Name | Template name |
| Description | Brief description of the template’s purpose |
| Default | Whether this template is used by default |
| Active | Whether the template is available for use |
| Actions | Edit, Clone, Preview, Download, Delete, Set as Default |
Creating a Form Template
Section titled “Creating a Form Template”- Click Create Template.
- Enter the template Name and Description.
- Check Is Default if this should be the default template for new records.
- Check Is Active to make the template available immediately.
- Add sections and fields (see below).
- Click Save.
Adding Sections
Section titled “Adding Sections”Sections group related fields together. Each section has:
- Name — The section heading displayed to users
- Description — Optional helper text shown below the section heading
- Order Index — Controls the display order (lower numbers appear first)
- Is Required — Whether the section must be completed
Adding Fields to a Section
Section titled “Adding Fields to a Section”Within each section, add fields using the field type selector. Each field has:
- Field Type — The type of input control (see supported types below)
- Name — Internal field identifier (used in the API)
- Label — Display label shown to users
- Description — Helper text shown below the field
- Order Index — Controls display order within the section
- Is Required — Whether the field must be filled in
- Is Visible — Whether the field is shown (hidden fields can be used for defaults)
- Default Value — Pre-populated value for new records
- Enable AI Suggestion — Enables AI-powered auto-fill suggestions for this field
- Configuration — Type-specific settings (e.g., dropdown options, file size limits)
Supported Field Types
Section titled “Supported Field Types”| Field Type | Description | Configuration Options |
|---|---|---|
text | Single-line text input | — |
textarea | Multi-line text area | — |
select | Dropdown menu | options: Array of choice strings |
number | Numeric input | — |
date | Date picker | — |
boolean | Checkbox (true/false) | — |
document_picker | Multi-select document chooser with search | — |
capa_picker | Multi-select CAPA chooser with search and status filters | Status filter options: open, in_progress, closed, draft |
deviation_picker | Multi-select deviation chooser with search | — |
image | Image upload with drag-and-drop, preview, and captions | allowed_types, max_size_mb, allow_multiple |
file | File upload | allowed_types, max_size_mb, allow_multiple |
Document Picker Details
Section titled “Document Picker Details”The document picker field provides:
- A search input to filter documents by title or status
- A multi-select list showing matching documents
- Selected document tags with individual remove buttons
CAPA Picker Details
Section titled “CAPA Picker Details”The CAPA picker field provides:
- A search input with debounced API-powered search (searches by ID, title, status, or description)
- Status filter checkboxes (open, in_progress, closed, draft)
- A multi-select list showing matching CAPAs with creation date and linked deviation count
- Selected CAPA tags with individual remove buttons
Image Upload Details
Section titled “Image Upload Details”The image upload field provides:
- Drag-and-drop zone for image files
- Click-to-browse file selection
- Configurable allowed file types (default: jpg, jpeg, png, gif)
- Configurable maximum file size (default: 10 MB)
- Image preview grid with thumbnails
- Optional caption input per image
- Individual image removal
Editing a Template
Section titled “Editing a Template”- Click Edit on the template row.
- The template details load with all sections and fields.
- Modify the template name, description, sections, or fields.
- Drag fields using the grip handle to reorder them.
- Click Save to apply changes.
Cloning a Template
Section titled “Cloning a Template”- Click Clone on the template row.
- A copy of the template is created with a modified name (e.g., “Copy of Original Template”).
- Edit the cloned template as needed.
Setting the Default Template
Section titled “Setting the Default Template”- Click Set as Default on the template row.
- The selected template becomes the default for its module.
- Only one template per module can be the default at a time.
The default template is automatically used when users create new records in the corresponding module.
Previewing a Template
Section titled “Previewing a Template”- Click Preview (eye icon) on the template row.
- A modal displays how the form will appear to end users, including all sections and field types.
- Close the preview to return to the template list.
Downloading a Template
Section titled “Downloading a Template”Click Download on the template row to export the template definition as a file. This can be used for backup, documentation, or transfer to another environment.
Permissions
Section titled “Permissions”| Action | Required Permission |
|---|---|
| View form templates | Admin role |
| Create/edit/delete templates | Admin role |
| Set default template | Admin role |
AI Suggestions
Section titled “AI Suggestions”When Enable AI Suggestion is checked on a field, the system will offer AI-powered auto-fill suggestions when users are filling out the form. The ai_suggestion_field property controls which AI model field is used for the suggestion context.