# Form App

When you create a workflow with a Form trigger in Lleverage, you can publish it as a standalone form application with its own dedicated URL. This allows you to collect structured inputs from users and process them through your workflow.

<figure><img src="https://3370306531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlgSglJDQZxDZdn20CUcl%2Fuploads%2Fqr2VpHcmw0NNzub0LUwT%2FForm.png?alt=media&#x26;token=2b2582bc-a331-46a1-8ad8-48900c198e3d" alt="" width="375"><figcaption><p>Form Publish Panel</p></figcaption></figure>

## Form Applications

When you create a workflow with a Form trigger in Lleverage, you can publish it as a standalone form application with its own dedicated URLs. This allows you to collect structured inputs from users and process them through your workflow.

### Key Features

* Two dedicated URL options for your form application
* Configurable input fields with validation options
* Required field capabilities for ensuring complete data collection
* Embed code for integration into existing websites
* Similar functionality to Chat applications but with structured inputs
* **URL parameter pre-filling** — pass values via the URL to automatically populate form fields

### How to Create a Form Application

1. Create a workflow with a "Form" trigger
2. Configure your input fields in the trigger settings
3. Set fields as required or optional based on your needs
4. Build your workflow to process the form submissions
5. Test the workflow using the Run Panel
6. Click the "Publish" button in the top right corner

> 💡 Forms are ideal for collecting structured information that needs to follow a specific format.

### How to Access Your Form Application URLs

1. Publish your workflow with a Form trigger
2. The Publish Panel will display two app links:
   * **Lleverage Link**: Your form app within the Lleverage workspace
   * **External App Link**: A standalone external link to your form app
3. Copy either URL to share with users
4. Anyone with the links can access and submit your form

> 💡 Both app links provide dedicated interfaces for users to interact with your workflow through a structured form.

### Pre-filling Forms with URL Parameters

You can pre-fill form fields by appending URL parameters to your app link using **bracket notation**:

```
https://app.lleverage.ai/<orgId>/w/<workflowId>?i[fieldName]=value
```

**Example:** If your form has fields called `machine` and `model`:

```
https://app.lleverage.ai/xukfwbfwk/w/y8jbih5h?i[machine]=ficep&i[model]=coolaid
```

When users open this link, the `machine` field will show "ficep" and the `model` field will show "coolaid" — already filled in and ready to submit or adjust.

**How it works:**

* URL parameter keys are matched to form field names
* Matching fields have their default values set automatically
* Non-matching parameters are silently ignored
* Users can still edit pre-filled values before submitting

**Common use cases:**

* Linking from an ERP with article numbers or order references pre-filled
* Creating per-client URLs with customer-specific defaults
* Embedding parameters in QR codes for factory or warehouse scanning
* Including pre-filled links in email templates to reduce manual entry

> 💡 For full details on URL parameter syntax and how they flow through the App Trigger, see the [URL Parameters section in the Triggers documentation](https://docs.lleverage.ai/canvas-actions/triggers#app-trigger-url-parameters).

> ⚠️ URL parameters are visible in the browser address bar. Avoid passing sensitive data through URL parameters.

### How to Get Embed Code for Your Form

1. Publish your workflow with a Form trigger
2. In the Publish Panel, click the "Get Code" button
3. Copy the provided embed code
4. Paste this code into the HTML of your website
5. The form will now appear directly on your website

> 💡 Embedding forms in your website creates a seamless experience for your users without redirecting them to another page.

### How to Configure Required Fields

1. Create or edit a workflow with a Form trigger
2. Configure your input fields in the trigger settings
3. Enable the "Required" option for fields that must be completed
4. Users will be prompted to complete these fields before submission

> ⚠️ Be mindful about which fields you mark as required. Only make fields required if they are truly necessary for your workflow to function properly.

### How to Customize Your Form Application

1. Publish your workflow with a Form trigger
2. In the Publish Panel, locate and click the "Customize" button
3. Upload your logo to brand the form interface
4. Save your customization settings
5. Your branded form application is now ready to share

> 💡 Adding your logo helps create a more professional and branded experience for users.

### How to Share Your Form Application

1. Choose between the Lleverage link (within workspace) or External App link (standalone)
2. Copy your preferred link from the Publish Panel
3. Share the link directly with users via email, messaging, or other channels
4. Users can access the form application from any web browser
5. No Lleverage account is required for users to interact with your form

### Best Practices for Form Applications

1. Keep forms concise and focused on collecting necessary information
2. Provide clear labels and placeholder text for each field
3. Use validation to ensure data quality
4. Test your form thoroughly before sharing it with users
5. Consider the user experience and minimize the number of required fields
6. Use URL parameters to pre-fill known values and reduce user effort

> ⚠️ Remember that anyone with your form application URLs can access them, so consider authentication needs for sensitive information.
