Skip to main content

How to create and use custom forms

Updated yesterday

Summary

This guide explains how to configure Custom forms for your web widget. Unlike other actions, Custom forms do not run during a conversation. Instead, they let you define the structure and behavior of forms that appear in your widget to collect customer information such as leads, contact details, or attachments.

Instructions

Follow these steps to create and configure a custom form for your web widget:

Set up the form

  • Log into your Astra account.

  • Go to Action Library.

  • Select Custom forms action.

  • Open the Configuration step.

Configure form settings

1. Action intent

What to do:

  • Enter an action name and intent that describe the form.

How it works:

  • For Custom forms, the intent is mainly used for identification.

  • It helps you distinguish between multiple forms in your workspace.

2. Form definition

What to do:

  • Add fields to your form, such as:

    • Text inputs (e.g., name, email)

    • Dropdowns or selections

    • Attachments (file uploads)

  • Configure each field:

    • Label (what the user sees)

    • Type (text, file, etc.)

    • Required or optional

How it works:

  • The form structure you define is rendered in the web widget.

  • When a user submits the form:

    • The data is captured and mapped to your lead or session data

    • It can be used in downstream workflows or integrations

Preview:

  • Use the preview section to see how the form will appear to users.

3. Form behavior

What to do:

  • Configure how and when the form appears.

Available settings:

  • Lead collection method:

    • Currently supports showing the full form at once.

  • Trigger conditions:

    • Choose when the form should appear:

      • Smart strategy: Display the form when users are most engaged

      • Start of the conversation: Display the form when user initiates a conversation

      • After user feedback: Display the form when users rate the conversation or response

  • Trigger frequency:

    • Define after how many responses the form should appear

    • Use 0 to show it immediately

  • Maximum attempts:

    • Set how many times the form can be shown until it is submitted

  • Form completion required:

    • Enable this if users must complete the form before continuing the chat

How it works:

  • These settings control the user experience and ensure forms appear at the right time without being intrusive.

4. Publishing the form

  • What to do:

    • Save the form configuration.

    • Move it from draft to published.

    • Attach the form to the relevant agent.

  • How it works:

    • Once published:

      • The form becomes active in the web widget.

      • Visitors will see the form based on your configured behavior rules.

When to use custom forms

Use Custom forms when you want to:

  • Collect lead information from website visitors

  • Capture structured data during conversations

  • Require users to provide details before proceeding

  • Enable file uploads for support or onboarding

This helps you gather consistent and actionable data directly from your web widget.

Did this answer your question?