Reference Form Context Data
Quick reference for accessing field values, workflow data, and URL parameters
The context object gives you access to form field values, launch workflow results, and URL parameters. Use it in visibility expressions, default values, and HTML content.
Context Structure
Section titled “Context Structure”{ field: { // Current form field values email: "user@example.com", department: "engineering" },
workflow: { // Results from launch workflow user_id: "user-123", is_admin: true },
query: { // URL query parameters customer_id: "cust-456" }}Accessing Field Values
Section titled “Accessing Field Values”Reference form field values with context.field.*:
// Show field if checkbox checkedcontext.field.is_manager === true
// Show if dropdown has specific valuecontext.field.department === "engineering"
// Show if field has any valuecontext.field.email && context.field.email.length > 0// Pre-fill from another fieldcontext.field.primary_email
// Use workflow datacontext.workflow.user_email<div className="p-4 bg-blue-50 rounded-lg"> <p>Email: {context.field.email}</p> <p>Department: {context.field.department}</p></div>Accessing Workflow Data
Section titled “Accessing Workflow Data”Reference launch workflow results with context.workflow.*:
// In visibility expressioncontext.workflow.is_admin === true
// In HTML content<p>Welcome, {context.workflow.user_name}!</p>
// In default valuecontext.workflow.organization_nameAccessing URL Parameters
Section titled “Accessing URL Parameters”Reference query parameters with context.query.*:
First, enable the parameter on a form field:
- Create field with same name as parameter
- Enable Allow as Query Parameter
- Access in form with
context.query.field_name
Example URL: /execute/form?customer_id=123
// In visibility expressioncontext.query.customer_id !== null
// In default valuecontext.query.customer_id
// In HTML content<p>Customer ID: {context.query.customer_id}</p>Common Patterns
Section titled “Common Patterns”Show Field Conditionally
Section titled “Show Field Conditionally”// Show if another field has specific valuecontext.field.request_type === "urgent"
// Show if user is admincontext.workflow.is_admin === true
// Show if URL parameter providedcontext.query.edit_mode === "true"Pre-fill Fields
Section titled “Pre-fill Fields”// From launch workflowcontext.workflow.customer_email
// From another fieldcontext.field.billing_email
// From URL parametercontext.query.preset_valueDisplay Dynamic Content
Section titled “Display Dynamic Content”{/* Show user-specific message */}<div className="p-4 bg-blue-50 rounded-lg"> <p>Hello {context.workflow.user_name}!</p> <p>Selected department: {context.field.department}</p></div>
{/* Conditional content */}{context.workflow.is_premium && ( <div className="p-4 bg-gold-50 rounded-lg"> <p>Premium features enabled</p> </div>)}Null Safety
Section titled “Null Safety”Always check if values exist before using them:
// Safe check for field valuecontext.field.email && context.field.email.length > 0
// Safe check for workflow datacontext.workflow.user_name || "Guest"
// Safe navigationcontext.workflow.user?.email
// Safe array checkcontext.workflow.permissions?.includes("admin")Troubleshooting
Section titled “Troubleshooting”Undefined values: Use Info button in form builder to see available context. Verify launch workflow returns expected data.
Field not updating: Form fields update in real-time. Visibility and HTML content re-evaluate when referenced fields change.
Query parameters not working: Ensure field with matching name exists and has “Allow as Query Parameter” enabled.
Next Steps
Section titled “Next Steps”- Show Fields Based on User Permissions - Conditional visibility
- Display Personalized Welcome Messages - Dynamic content
- Pre-fill Forms from URL Parameters - Launch workflows
- Context Object Reference - Complete API reference