> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firstwork.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Form Builder

> Create dynamic, multi-page forms with conditional logic, file uploads, and compliance integration

## Overview

The **Form Builder** is a powerful tool for creating data collection forms that power hiring flows, onboarding, and custom workflows. Forms support multiple pages, conditional logic, various field types, document uploads, and real-time validation.

## Form Structure

```
Form (FBForm)
├── Page 1
│   ├── Text Field: Full Name
│   ├── Email Field: Email Address
│   └── Phone Field: Phone Number
├── Page 2
│   ├── File Upload: Resume
│   ├── Dropdown: Years of Experience
│   └── Conditional Section
│       └── Text Area: Additional Details
└── Page 3
    ├── E-Signature: Agreement
    └── Submit Button
```

### Form Elements

Forms are built from **Form Elements** — individual fields and layout components:

| Element Type | Description                           |
| ------------ | ------------------------------------- |
| Text         | Single-line text input                |
| Text Area    | Multi-line text input                 |
| Email        | Email address with validation         |
| Phone        | Phone number with country code        |
| Number       | Numeric input                         |
| Date         | Date picker                           |
| Time         | Time picker                           |
| Dropdown     | Single-select dropdown                |
| Multi-Select | Multiple choice selection             |
| Radio        | Radio button group                    |
| Checkbox     | Single checkbox or checkbox group     |
| File Upload  | Document/image upload                 |
| E-Signature  | Digital signature capture             |
| Address      | Address with autocomplete             |
| Rich Text    | Formatted text display (instructions) |
| Section      | Visual grouping of fields             |
| Page Break   | Multi-page separator                  |

## Form Templates

**Form Templates** are reusable blueprints that can be used to quickly create new forms. Firstwork includes built-in templates for common use cases:

* Personal information
* Employment eligibility
* Background check authorization
* Tax withholding (W-4)
* Direct deposit setup
* Emergency contacts
* Non-disclosure agreements

You can also create custom templates from any existing form.

## Conditional Logic

Forms support **conditional visibility** — fields or sections that show/hide based on the values of other fields.

**Examples:**

* Show "Visa Type" field only if "Are you authorized to work?" is "No"
* Display "Other" text field when "Please specify" is selected from a dropdown
* Show additional pages based on employment type selection

## Form Submissions

When a user fills out a form, a **Form Submission** is created containing:

| Component           | Description                           |
| ------------------- | ------------------------------------- |
| Form Submission     | The overall submission record         |
| Element Submissions | Individual field values               |
| File Attachments    | Uploaded documents                    |
| Timestamps          | Created, updated, and submitted times |
| Status              | Draft, submitted, or reviewed         |

### Real-Time Saving

Form submissions are saved at the **element level** in real-time. This means:

* Users can leave and return to a form without losing progress
* Admins can see partial submissions
* Automations can trigger on individual field changes

### Form Compliance Rules

**Form Compliance Rules** attach conditions to forms that evaluate submission data:

* Validate that required documents are uploaded
* Check that field values meet specific criteria
* Trigger automations based on submission data

## Funnels

**Funnels** create public URLs for form access:

* Candidates can submit forms without logging in
* Pre-fill data via URL parameters
* Track submission source with custom parameters
* Set expiration dates and submission limits

### Pre-filled Data

Custom links support pre-filling form fields:

```
https://app.firstwork.com/apply/{custom_link_id}?source=linkedin&role=engineer
```

Pre-filled values can map to any form element, enabling:

* Source tracking for recruitment campaigns
* Referral program attribution
* Partner-specific application flows

## Document Requirements

**Company Document Requirements** define which documents candidates must submit:

| Configuration   | Description                                           |
| --------------- | ----------------------------------------------------- |
| Document Type   | Type of document required (ID, certification, etc.)   |
| Required        | Whether the document is mandatory                     |
| Verification    | How the document is verified (manual, OCR, automated) |
| Expiration      | Whether the document has an expiration date           |
| Compliance Rule | Rule that evaluates the document data                 |

## OCR Processing

Document uploads can be processed with **OCR** to:

* Extract text from images and PDFs
* Auto-fill form fields with extracted data
* Validate document content against compliance rules
* Support multiple languages and document formats
