Skip to content

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.

  • 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
  1. Navigate to Admin in the sidebar.
  2. Select the appropriate tab:
    • Deviation Forms for deviation form templates
    • CAPA Forms for CAPA form templates
    • Audit Forms for audit form templates

The main view displays a table of existing form templates with:

ColumnDescription
NameTemplate name
DescriptionBrief description of the template’s purpose
DefaultWhether this template is used by default
ActiveWhether the template is available for use
ActionsEdit, Clone, Preview, Download, Delete, Set as Default
  1. Click Create Template.
  2. Enter the template Name and Description.
  3. Check Is Default if this should be the default template for new records.
  4. Check Is Active to make the template available immediately.
  5. Add sections and fields (see below).
  6. Click Save.

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

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)
Field TypeDescriptionConfiguration Options
textSingle-line text input
textareaMulti-line text area
selectDropdown menuoptions: Array of choice strings
numberNumeric input
dateDate picker
booleanCheckbox (true/false)
document_pickerMulti-select document chooser with search
capa_pickerMulti-select CAPA chooser with search and status filtersStatus filter options: open, in_progress, closed, draft
deviation_pickerMulti-select deviation chooser with search
imageImage upload with drag-and-drop, preview, and captionsallowed_types, max_size_mb, allow_multiple
fileFile uploadallowed_types, max_size_mb, allow_multiple

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

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

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
  1. Click Edit on the template row.
  2. The template details load with all sections and fields.
  3. Modify the template name, description, sections, or fields.
  4. Drag fields using the grip handle to reorder them.
  5. Click Save to apply changes.
  1. Click Clone on the template row.
  2. A copy of the template is created with a modified name (e.g., “Copy of Original Template”).
  3. Edit the cloned template as needed.
  1. Click Set as Default on the template row.
  2. The selected template becomes the default for its module.
  3. 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.

  1. Click Preview (eye icon) on the template row.
  2. A modal displays how the form will appear to end users, including all sections and field types.
  3. Close the preview to return to the template list.

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.

ActionRequired Permission
View form templatesAdmin role
Create/edit/delete templatesAdmin role
Set default templateAdmin role

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.