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

# Form Trigger

> Start workflows from custom form submissions with built-in validation and public access options.

<img src="https://mintcdn.com/langdock-34/cWyoB3RsITQmAUnM/images/workflows/nodes/triggers/form.jpg?fit=max&auto=format&n=cWyoB3RsITQmAUnM&q=85&s=4aca33258fb6fd51affa8340c0759d84" alt="Form Trigger" width="1920" height="903" data-path="images/workflows/nodes/triggers/form.jpg" />

## Overview

The Form Trigger creates a custom web form that starts your workflow when submitted. It's perfect for collecting information from users - whether they're internal team members or external customers - and automatically processing that data.

<Info>
  **Best for**: Intake forms, data collection, customer requests, feedback
  gathering, and application submissions.
</Info>

## When to Use Form Trigger

**Perfect for:**

* Customer feedback or support request forms
* Internal request forms (IT tickets, access requests)
* Application or registration forms
* Survey responses that need processing
* Data collection from non-technical users

**Not ideal for:**

* System-to-system integrations (use Webhook Trigger)
* Scheduled recurring tasks (use Scheduled Trigger)
* Processing existing data (use Manual Trigger)

## Configuration

### Basic Setup

<img src="https://mintcdn.com/langdock-34/rO9uOaLDP5eDXamu/images/workflows/screenshots/FormTriggeConfigr.png?fit=max&auto=format&n=rO9uOaLDP5eDXamu&q=85&s=7e5be71ef8354c90f05df1d0f510017f" alt="Form Trigger" width="3840" height="2160" data-path="images/workflows/screenshots/FormTriggeConfigr.png" />

1. **Form Title**: Give your form a descriptive name
2. **Description**: Optional subtitle or instructions
3. **Thank You Message**: Message shown after successful submission

### Field Types

Add fields to collect specific data:

| Field Type      | Description                         | Use Case                         |
| --------------- | ----------------------------------- | -------------------------------- |
| **Text**        | Single-line text input              | Name, title                      |
| **Long Text**   | Multi-line text area                | Feedback, descriptions, comments |
| **Number**      | Numeric input                       | Quantity, amount, rating         |
| **Email**       | Email address input with validation | Contact email, work email        |
| **Date**        | Date picker                         | Due dates, event dates           |
| **Dropdown**    | Select from predefined options      | Category, priority, department   |
| **Checkbox**    | True/false selection                | Agreements, preferences          |
| **File Upload** | Attachment upload                   | Documents, images, PDFs          |

### Field Configuration

<img src="https://mintcdn.com/langdock-34/rO9uOaLDP5eDXamu/images/workflows/screenshots/FormTriggerFields.png?fit=max&auto=format&n=rO9uOaLDP5eDXamu&q=85&s=0c881fce209489aff9784adfd9de25b0" alt="Form Fields" width="3840" height="2160" data-path="images/workflows/screenshots/FormTriggerFields.png" />

For each field, configure:

* **Field Name**: Internal identifier (use snake\_case: `customer_name`)
* **Label**: Display text shown to users
* **Description**: Optional help text
* **Required**: Whether the field must be filled
* **Domain Restriction**: For Email fields, restrict submissions to one email domain

## How It Works

1. Form URL is generated automatically
2. User fills out the form fields
3. Form validates all required fields and formats
4. On submission, workflow starts with form data
5. User sees the thank you message
6. Form data is available in the workflow via `{{trigger.output.field_name}}`

## Example Use Cases

### Customer Feedback Form

```text theme={null}
Form Trigger
  - name (text, required)
  - email (email, required)
  - feedback (long text, required)
  - product (dropdown: App, Web, API)

→ Agent: Analyze sentiment and categorize
→ Condition: Check priority
  → High: Notify product team
  → Low: Store in database
→ Action: Create ticket in support system
```

### IT Support Request

```text theme={null}
Form Trigger
  - requester_name (text, required)
  - department (dropdown)
  - issue_type (dropdown: Hardware, Software, Access)
  - description (long text, required)
  - urgency (dropdown: Low, Medium, High)

→ Agent: Classify issue and suggest solution
→ Action: Create JIRA ticket
→ Notification: Alert IT team
```

### Job Application

```text theme={null}
Form Trigger
  - applicant_name (text, required)
  - email (email, required)
  - position (dropdown)
  - resume (file upload, required)
  - cover_letter (long text)

→ Agent: Extract candidate info from resume
→ Agent: Screen against job requirements
→ Condition: Check fit score
  → Strong: Schedule interview
  → Moderate: Add to review queue
  → Weak: Send polite rejection
```

## Accessing Form Data

<img src="https://mintcdn.com/langdock-34/izZCFDnb6kknuLBZ/images/workflows/screenshots/FormTriggerOutput.png?fit=max&auto=format&n=izZCFDnb6kknuLBZ&q=85&s=3e8556024946503dd3b3e573866be62d" alt="Form Fields" width="3840" height="2160" data-path="images/workflows/screenshots/FormTriggerOutput.png" />

Use the `trigger` variable to access submitted data:

```handlebars theme={null}
Customer Name: {{trigger.output.name}}
Email: {{trigger.output.email}}
Feedback: {{trigger.output.feedback}}
Selected Product: {{trigger.output.product}}
```

### File Uploads

For file upload fields, access the file metadata:

```handlebars theme={null}
File name: {{trigger.output.resume.filename}}
Mime type: {{trigger.output.resume.mimeType}}
File size: {{trigger.output.resume.size}}
```

Replace `resume` with your file field name.

## Sharing Your Form

### Copy Form URL

1. Click on the Form Trigger node
2. Click "Copy URL" in the node toolbar
3. Share the URL via email, chat, or embed on your website
4. The URL is publicly available when it was configured like that

### Embedding Options

**Direct Link**

```html theme={null}
<a href="https://app.langdock.com/workflows/forms/abc123">Submit Feedback</a>
```

**iFrame Embed**

```html theme={null}
<iframe
  src="https://app.langdock.com/workflows/forms/abc123"
  width="100%"
  height="600"
  frameborder="0"
>
</iframe>
```

## Best Practices

<AccordionGroup>
  <Accordion title="Keep Forms Short">
    Only ask for essential information. Long forms have higher abandonment rates. You can always collect additional details later in the workflow.
  </Accordion>

  <Accordion title="Use Clear Labels">
    Field labels should clearly indicate what information is needed. Add description text for fields that might be confusing.
  </Accordion>

  <Accordion title="Set Appropriate Defaults">
    Pre-fill fields with sensible defaults when possible to reduce user effort.
  </Accordion>

  <Accordion title="Test the User Experience">
    Submit test forms yourself to ensure the experience is smooth and instructions are clear.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Webhook Trigger" icon="webhook" href="/en/using-langdock/workflows/nodes/triggers/webhook-trigger">
    Receive HTTP POST requests from external systems
  </Card>

  <Card title="Agent Node" icon="brain" href="/en/using-langdock/workflows/nodes/agent-node">
    Process form submissions with AI
  </Card>

  <Card title="Getting Started" icon="rocket" href="/en/using-langdock/workflows/getting-started">
    Step-by-step tutorial with form example
  </Card>

  <Card title="Field Modes" icon="sliders" href="/en/using-langdock/workflows/fundamentals/field-modes">
    Learn about configuring form fields
  </Card>
</CardGroup>
