Skip to content

Create Dynamic Forms

Build a form with validation and data providers in 15 minutes

Forms are a way to dynamically configure input for workflows and expose them in a user-friendly way. Think about it this way: You have a script called offboard_user. It might need to accept a user_id to determine which Microsoft 365 user to offboard. With forms, you can expose the actual list of users to select from instead of typing in a user_id.

A form that collects user information and executes a workflow to create the user.

  1. Navigate to Forms → Click + button

  2. Fill in form details:

    • Name: “Hello World”
    • Description: “Hello from Bifrost”
    • Linked Workflow: Select your workflow (e.g., hello_world)

    alt text

  3. Click Create

  1. From Workflow Parameters:

    • Drag workflow parameters from left panel
    • Fields marked with a star are ones required by the workflow
    • Fields are auto-configure with correct types

    alt text

  2. Or use Field Types:

    • Drag field type (Text, Email, Select, etc.)
    • Configure manually
  3. Arrange fields by dragging

After you drag a field, the Edit Field screen will appear. This is also available from the form.

  • Field Name: Variable name for the field available to workflows
  • Label: Display text
  • Placeholder: Hint text in empty field
  • Help Text: Additional guidance
  • Required: Enforce field completion
  • Default Value: Pre-populated value

You can find more comprehensive documentation in the How-To section under Forms.

  1. Click Save in form builder

  2. Refresh the Forms list.

  3. On your form, click Launch.

    alt text

  4. Fill out fields and click Submit

You’ll see the same execution details page you did when running the workflow directly.

Show/hide fields conditionally:

// Show "Manager Email" only if "Is Manager" is checked
context.field.is_manager === true;
// Show "Department" only if "Employee Type" is "full-time"
context.field.employee_type === "full-time";

Create dynamic dropdowns with data providers:

  1. Create workspace/data_providers/departments.py:
from bifrost import data_provider, ExecutionContext
@data_provider(
name="get_departments",
description="List of departments",
cache_ttl_seconds=600
)
async def get_departments(context: ExecutionContext):
return [
{"label": "Engineering", "value": "eng"},
{"label": "Sales", "value": "sales"},
{"label": "Support", "value": "support"}
]
  1. In form builder, select field → Data Providerget_departments

  2. Save and test - dropdown auto-populates