{"version":"1.0.0","lastUpdated":"2026-05-17T13:02:52.437Z","systemInstructions":"You are a form generation assistant. Your task is to generate valid JSON form configurations based on user requirements.\n\nCRITICAL RULES:\n1. Always generate complete, valid JSON that matches the FormField interface structure\n2. Every field MUST have: id, type, label, and required properties\n3. Use appropriate field types for the use case (see fieldTypes documentation)\n4. Include conditionalLogic when fields should show/hide based on other fields\n5. Use settings property for field-specific configurations\n6. Include validation rules when appropriate\n7. For document-extraction fields, always include customFields array with proper structure\n8. Field IDs must be unique within a form\n9. Follow the examples provided for common patterns\n\nFORM STRUCTURE:\n- A form has: title, description (optional), and fields array\n- Each field in fields array is a FormField object\n- Fields are processed in order (array order matters)\n\nFIELD ID GENERATION:\n- Use kebab-case for field IDs (e.g., \"email-address\", \"phone-number\")\n- Make IDs descriptive but concise\n- Ensure uniqueness within the form\n\nCONDITIONAL LOGIC:\n- Use conditionalLogic.enabled: true to enable conditional behavior\n- action: \"show\" means field is hidden by default, shown when conditions met\n- action: \"hide\" means field is visible by default, hidden when conditions met\n- operator: \"AND\" means all conditions must be true, \"OR\" means any condition can be true\n- Reference other fields by their id in conditions.fieldId\n\nVALIDATION:\n- Use validation object for field validation rules\n- Common validations: minLength, maxLength, min, max, pattern, emailFormat, phoneFormat\n- For choice fields: minSelections, maxSelections\n\nSETTINGS:\n- Each field type has specific settings (see fieldTypes documentation)\n- Settings are optional but recommended for better UX\n- Common settings: placeholder, description, helpText\n\nAI FIELDS (document-extraction):\n- Requires customFields array with field definitions\n- Each customField needs: id, name, description, fieldType, required, editable\n- fieldType options: \"single_value\", \"list\", \"number\", \"date\"\n- Set acceptedFileTypes and maxFileSize appropriately\n\nWhen generating forms:\n1. Analyze the user's requirements\n2. Select appropriate field types\n3. Configure fields with proper settings and validation\n4. Add conditional logic where needed\n5. Ensure all required fields are marked as required: true\n6. Provide helpful placeholders and descriptions\n7. Follow the examples for common patterns","fieldTypes":{"text":{"description":"Single-line text input field for short answers like names, titles, or short responses.","useCases":["Collecting names, titles, or short text responses","Single-word or short phrase inputs","Search queries or keywords"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text shown inside the input when empty","examples":["Enter your name","Type here..."]},"description":{"type":"string","description":"Helper text displayed below the label","examples":["This will be used for your account"]},"helpText":{"type":"string","description":"Additional help text shown on hover or as tooltip","examples":["Use your legal name as it appears on ID"]},"validation":{"type":"object","description":"Validation rules for the field","examples":[{"minLength":2,"maxLength":50,"pattern":"^[A-Za-z ]+$","customMessage":"Only letters and spaces allowed"}]}},"exampleJSON":{"id":"name-field","type":"text","label":"Full Name","placeholder":"Enter your full name","required":true,"description":"Please enter your legal name","validation":{"minLength":2,"maxLength":100}},"commonPatterns":["Use for names, titles, short identifiers","Combine with validation.pattern for format restrictions","Use placeholder to guide user input"]},"textarea":{"description":"Multi-line text input for longer responses like comments, descriptions, or essays.","useCases":["Collecting comments, feedback, or descriptions","Essay questions or long-form responses","Address fields or detailed explanations"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text shown in the textarea when empty","examples":["Enter your message here...","Describe your experience"]},"description":{"type":"string","description":"Helper text displayed below the label","examples":["Please provide as much detail as possible"]},"validation":{"type":"object","description":"Validation rules including minLength and maxLength","examples":[{"minLength":10,"maxLength":1000,"customMessage":"Please provide at least 10 characters"}]}},"exampleJSON":{"id":"comments-field","type":"textarea","label":"Additional Comments","placeholder":"Enter any additional information...","required":false,"description":"Optional: Share any other relevant details","validation":{"maxLength":500}},"commonPatterns":["Use for longer text responses (comments, descriptions)","Set maxLength to prevent extremely long responses","Consider minLength for required detailed responses"]},"email":{"description":"Email address input with automatic email format validation.","useCases":["Collecting email addresses for accounts or newsletters","Contact information forms","Login or registration forms"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text, typically shows email format example","examples":["you@example.com","Enter your email address"]},"description":{"type":"string","description":"Helper text about email usage","examples":["We'll never share your email with third parties"]},"validation":{"type":"object","description":"Email-specific validation (emailFormat is automatically true)","examples":[{"customMessage":"Please enter a valid email address"}]}},"exampleJSON":{"id":"email-field","type":"email","label":"Email Address","placeholder":"you@example.com","required":true,"description":"We'll use this to send you important updates"},"commonPatterns":["Always use for email collection (has built-in validation)","Set required: true for account creation","Use description to explain how email will be used"]},"tel":{"description":"Phone number input field with international phone number support.","useCases":["Collecting phone numbers for contact","Two-factor authentication setup","Customer support contact forms"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text for phone format","examples":["+1 (555) 123-4567"]},"description":{"type":"string","description":"Helper text about phone number usage","examples":["Include country code for international numbers"]},"settings":{"type":"object","description":"Phone-specific settings","examples":[{"phone":{"defaultCountry":"US","defaultValue":"+1"}}]},"validation":{"type":"object","description":"Phone format validation","examples":[{"phoneFormat":true,"customMessage":"Please enter a valid phone number"}]}},"exampleJSON":{"id":"phone-field","type":"tel","label":"Phone Number","placeholder":"+1 (555) 123-4567","required":true,"settings":{"phone":{"defaultCountry":"US"}},"validation":{"phoneFormat":true}},"commonPatterns":["Use settings.phone.defaultCountry to set default country","Enable phoneFormat validation for format checking","Consider making optional for international users"]},"url":{"description":"URL/website input field with automatic URL format validation.","useCases":["Collecting website URLs","Social media profile links","Portfolio or project links"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text showing URL format","examples":["https://example.com","Enter your website URL"]},"description":{"type":"string","description":"Helper text about URL requirements","examples":["Include http:// or https://"]},"validation":{"type":"object","description":"URL format validation","examples":[{"urlFormat":true,"customMessage":"Please enter a valid URL starting with http:// or https://"}]}},"exampleJSON":{"id":"website-field","type":"url","label":"Website URL","placeholder":"https://example.com","required":false,"validation":{"urlFormat":true}},"commonPatterns":["Use urlFormat validation to ensure proper URL format","Include protocol (http/https) in placeholder example","Often optional unless specifically needed"]},"number":{"description":"Numeric input field for numbers, integers, or decimals.","useCases":["Collecting quantities, ages, or numeric values","Price or amount inputs","Scores, ratings, or measurements"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text showing expected number format","examples":["0","Enter a number","100.50"]},"description":{"type":"string","description":"Helper text about number requirements","examples":["Enter a value between 1 and 100"]},"validation":{"type":"object","description":"Number range validation","examples":[{"min":0,"max":100,"customMessage":"Value must be between 0 and 100"}]}},"exampleJSON":{"id":"age-field","type":"number","label":"Age","placeholder":"Enter your age","required":true,"validation":{"min":13,"max":120,"customMessage":"Age must be between 13 and 120"}},"commonPatterns":["Use validation.min and validation.max for range restrictions","Set appropriate min/max based on use case","Consider step values for decimal precision (via settings if needed)"]},"date":{"description":"Date picker field for selecting dates with calendar interface.","useCases":["Birth dates, event dates","Appointment scheduling","Deadlines or due dates"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text for date format","examples":["MM/DD/YYYY","Select a date"]},"description":{"type":"string","description":"Helper text about date requirements","examples":["Select your date of birth"]},"validation":{"type":"object","description":"Date range validation","examples":[{"dateRange":{"min":"1900-01-01","max":"2024-12-31"}}]}},"exampleJSON":{"id":"birthdate-field","type":"date","label":"Date of Birth","required":true,"validation":{"dateRange":{"min":"1900-01-01","max":"2024-12-31"}}},"commonPatterns":["Use validation.dateRange to restrict selectable dates","Set min date to prevent future dates for birth dates","Use ISO format (YYYY-MM-DD) for dateRange values"]},"time":{"description":"Time picker field for selecting time of day.","useCases":["Appointment time selection","Business hours","Event start/end times"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text for time format","examples":["HH:MM","Select time"]},"description":{"type":"string","description":"Helper text about time requirements","examples":["Select your preferred time"]},"settings":{"type":"object","description":"Time format and range settings","examples":[{"time":{"format":"12h","minTime":"09:00","maxTime":"17:00"}}]}},"exampleJSON":{"id":"appointment-time","type":"time","label":"Preferred Time","required":true,"settings":{"time":{"format":"12h","minTime":"09:00","maxTime":"17:00"}}},"commonPatterns":["Use settings.time.format for 12h or 24h display","Set minTime and maxTime to restrict available hours","Use HH:MM format for time values"]},"datetime":{"description":"Combined date and time picker for selecting both date and time.","useCases":["Event scheduling with specific times","Deadline tracking","Appointment booking systems"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"placeholder":{"type":"string","description":"Hint text for datetime format","examples":["Select date and time"]},"description":{"type":"string","description":"Helper text about datetime requirements","examples":["Select when you'd like to meet"]},"settings":{"type":"object","description":"DateTime format and range settings","examples":[{"datetime":{"minDateTime":"2024-01-01T00:00:00Z","maxDateTime":"2024-12-31T23:59:59Z","timezone":"UTC"}}]}},"exampleJSON":{"id":"meeting-datetime","type":"datetime","label":"Meeting Date & Time","required":true,"settings":{"datetime":{"minDateTime":"2024-01-01T00:00:00Z","timezone":"America/New_York"}}},"commonPatterns":["Use ISO 8601 format for minDateTime and maxDateTime","Specify timezone for accurate scheduling","Combine with validation for business hours restrictions"]},"select":{"description":"Dropdown select field allowing single selection from a list of options.","useCases":["Country, state, or category selection","Single choice from many options","Preventing invalid input with predefined options"],"requiredProperties":["id","type","label","required","options"],"optionalProperties":{"placeholder":{"type":"string","description":"Default text shown when no option is selected","examples":["Select an option","Choose one..."]},"description":{"type":"string","description":"Helper text about selection","examples":["Please select your country"]},"options":{"type":"array","description":"Array of option strings","examples":[["Option 1","Option 2","Option 3"],["Yes","No","Maybe"]]}},"exampleJSON":{"id":"country-field","type":"select","label":"Country","placeholder":"Select your country","required":true,"options":["United States","Canada","United Kingdom","Australia"]},"commonPatterns":["Use for single selection from 3+ options","Keep options list reasonable (under 20 items)","Use placeholder to guide selection"]},"radio":{"description":"Radio button group for single selection from visible options.","useCases":["Single choice with all options visible","Yes/No or binary choices","Preference selection (2-5 options)"],"requiredProperties":["id","type","label","required","options"],"optionalProperties":{"description":{"type":"string","description":"Helper text about selection","examples":["Select your preferred option"]},"options":{"type":"array","description":"Array of option strings (typically 2-5 options)","examples":[["Yes","No"],["Option A","Option B","Option C"]]},"settings":{"type":"object","description":"Radio button settings including 'Other' option","examples":[{"radio":{"allowOther":true,"otherLabel":"Other","otherPlaceholder":"Please specify"}}]}},"exampleJSON":{"id":"preference-field","type":"radio","label":"Do you agree?","required":true,"options":["Yes","No","Maybe"],"settings":{"radio":{"allowOther":true,"otherLabel":"Other","otherPlaceholder":"Please specify"}}},"commonPatterns":["Use for 2-5 options where all should be visible","Enable allowOther for flexible responses","Better UX than select for small option sets"]},"checkbox":{"description":"Checkbox group allowing multiple selections from a list of options.","useCases":["Multiple selections (interests, skills, features)","Agreement checkboxes (terms, newsletters)","Selecting multiple items from a list"],"requiredProperties":["id","type","label","required","options"],"optionalProperties":{"description":{"type":"string","description":"Helper text about multiple selection","examples":["Select all that apply"]},"options":{"type":"array","description":"Array of option strings","examples":[["Option 1","Option 2","Option 3"]]},"settings":{"type":"object","description":"Checkbox settings including 'Other' option","examples":[{"checkbox":{"allowOther":true,"otherLabel":"Other","otherPlaceholder":"Please specify"}}]},"validation":{"type":"object","description":"Selection count validation","examples":[{"minSelections":1,"maxSelections":3,"customMessage":"Please select 1-3 options"}]}},"exampleJSON":{"id":"interests-field","type":"checkbox","label":"Interests","required":false,"options":["Technology","Sports","Music","Travel"],"description":"Select all that apply","validation":{"minSelections":1,"maxSelections":5}},"commonPatterns":["Use validation.minSelections and maxSelections to control selection count","Enable allowOther for flexible responses","Use description 'Select all that apply' for clarity"]},"toggle":{"description":"Binary toggle switch for Yes/No or On/Off choices.","useCases":["Simple yes/no questions","Feature enable/disable","Agreement to terms or opt-ins"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about the toggle","examples":["Enable notifications"]},"settings":{"type":"object","description":"Toggle label customization","examples":[{"toggle":{"trueLabel":"Yes","falseLabel":"No"}}]}},"exampleJSON":{"id":"notifications-toggle","type":"toggle","label":"Enable Email Notifications","required":false,"settings":{"toggle":{"trueLabel":"Enabled","falseLabel":"Disabled"}}},"commonPatterns":["Use for simple binary choices","Customize labels with settings.toggle","Often set required: false for optional features"]},"imageChoice":{"description":"Visual choice field where users select from images instead of text options.","useCases":["Product selection with images","Style or design preferences","Visual preference surveys"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about image selection","examples":["Select your preferred style"]},"settings":{"type":"object","description":"Image choice configuration","examples":[{"imageChoice":{"options":[{"label":"Option 1","imageUrl":"https://example.com/image1.jpg"},{"label":"Option 2","imageUrl":"https://example.com/image2.jpg"}],"multiple":false,"imageSize":"medium"}}]}},"exampleJSON":{"id":"style-choice","type":"image-choice","label":"Choose Your Style","required":true,"settings":{"imageChoice":{"options":[{"label":"Modern","imageUrl":"https://example.com/modern.jpg"},{"label":"Classic","imageUrl":"https://example.com/classic.jpg"}],"multiple":false,"imageSize":"medium"}}},"commonPatterns":["Use imageUrl for each option (must be accessible URLs)","Set multiple: true for multi-select","Choose imageSize: 'small', 'medium', or 'large'"]},"rating":{"description":"Star or icon-based rating field for collecting ratings or scores.","useCases":["Product or service ratings","Satisfaction surveys","Quality assessments"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about rating","examples":["Rate your experience from 1 to 5"]},"settings":{"type":"object","description":"Rating configuration (icons, labels, max value)","examples":[{"rating":{"max":5,"icon":"star","minLabel":"Poor","maxLabel":"Excellent","color":"#FFD700"}}]}},"exampleJSON":{"id":"satisfaction-rating","type":"rating","label":"How satisfied are you?","required":true,"settings":{"rating":{"max":5,"icon":"star","minLabel":"Very Dissatisfied","maxLabel":"Very Satisfied"}}},"commonPatterns":["Use icon: 'star', 'heart', 'thumb', or 'smile'","Set max to desired rating scale (typically 5 or 10)","Add minLabel and maxLabel for clarity"]},"slider":{"description":"Numeric slider for selecting a value within a range.","useCases":["Numeric range selection (price, quantity, score)","Preference levels or intensity","Budget or capacity selection"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about slider value","examples":["Drag to select your budget"]},"settings":{"type":"object","description":"Slider range and configuration","examples":[{"slider":{"min":0,"max":100,"step":1,"range":false,"defaultValue":50}}]},"validation":{"type":"object","description":"Value range validation","examples":[{"min":0,"max":100}]}},"exampleJSON":{"id":"budget-slider","type":"slider","label":"Budget Range","required":true,"settings":{"slider":{"min":0,"max":10000,"step":100,"range":false,"defaultValue":5000}}},"commonPatterns":["Set range: true for dual-handle range selection","Use step to control precision (1 for integers, 0.1 for decimals)","Set defaultValue for initial position"]},"nps":{"description":"Net Promoter Score field (0-10 scale) for measuring customer loyalty.","useCases":["Customer satisfaction surveys","Net Promoter Score measurement","Likelihood to recommend"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about NPS question","examples":["How likely are you to recommend us?"]},"settings":{"type":"object","description":"NPS label configuration","examples":[{"nps":{"minLabel":"Not likely","maxLabel":"Very likely","showLabels":true}}]}},"exampleJSON":{"id":"nps-score","type":"nps","label":"How likely are you to recommend us to a friend?","required":true,"settings":{"nps":{"minLabel":"Not at all likely","maxLabel":"Extremely likely","showLabels":true}}},"commonPatterns":["Always 0-10 scale (fixed)","Use clear minLabel and maxLabel","Standard NPS question format"]},"likert":{"description":"Likert scale for agreement/disagreement or satisfaction levels.","useCases":["Agreement scales (Strongly Agree to Strongly Disagree)","Satisfaction levels","Frequency scales (Never to Always)"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about the scale","examples":["Select your level of agreement"]},"settings":{"type":"object","description":"Likert scale configuration","examples":[{"likert":{"scale":5,"labels":["Strongly Disagree","Disagree","Neutral","Agree","Strongly Agree"],"showLabels":true}}]}},"exampleJSON":{"id":"satisfaction-likert","type":"likert","label":"I am satisfied with the service","required":true,"settings":{"likert":{"scale":5,"labels":["Strongly Disagree","Disagree","Neutral","Agree","Strongly Agree"],"showLabels":true}}},"commonPatterns":["Common scales: 5 (Agreement) or 7 (More nuanced)","Provide labels array matching scale number","Use showLabels: true for clarity"]},"matrix":{"description":"Matrix/rating grid for rating multiple items across the same scale.","useCases":["Rating multiple products/features","Comparing items on same criteria","Multi-dimensional surveys"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about matrix rating","examples":["Rate each item below"]},"settings":{"type":"object","description":"Matrix configuration (rows, columns, input type)","examples":[{"matrix":{"inputType":"radio","rowLabels":["Quality","Price","Service"],"columnLabels":["Poor","Fair","Good","Excellent"]}}]}},"exampleJSON":{"id":"product-matrix","type":"matrix","label":"Rate Our Products","required":true,"settings":{"matrix":{"inputType":"radio","rowLabels":["Product A","Product B","Product C"],"columnLabels":["Poor","Fair","Good","Excellent"]}}},"commonPatterns":["Use inputType: 'radio' for single selection per row","Use inputType: 'checkbox' for multiple selections per row","Keep rowLabels and columnLabels arrays reasonable length"]},"ranking":{"description":"Drag-and-drop ranking field for ordering items by preference.","useCases":["Prioritizing features or options","Ordering preferences","Ranking importance"],"requiredProperties":["id","type","label","required","options"],"optionalProperties":{"description":{"type":"string","description":"Helper text about ranking","examples":["Drag to rank in order of importance"]},"options":{"type":"array","description":"Items to be ranked","examples":[["Option 1","Option 2","Option 3"]]},"settings":{"type":"object","description":"Ranking configuration","examples":[{"ranking":{"allowTies":false}}]}},"exampleJSON":{"id":"priority-ranking","type":"ranking","label":"Rank Your Priorities","required":true,"options":["Price","Quality","Service","Speed"],"settings":{"ranking":{"allowTies":false}}},"commonPatterns":["Use for 3-10 items (too many becomes cumbersome)","Set allowTies: false to force unique rankings","Provide clear instructions in description"]},"file":{"description":"File upload field for documents, images, or other files.","useCases":["Resume or document uploads","Image submissions","Supporting documents or attachments"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about file requirements","examples":["Upload PDF, DOC, or DOCX files only"]},"settings":{"type":"object","description":"File upload configuration","examples":[{"file":{"multiple":false,"accept":["application/pdf","image/*"],"allowedExtensions":["pdf","jpg","png"],"maxFileSize":5242880}}]},"validation":{"type":"object","description":"File validation rules","examples":[{"fileTypes":["pdf","doc","docx"],"maxFileSize":5242880}]}},"exampleJSON":{"id":"resume-upload","type":"file","label":"Upload Resume","required":true,"description":"PDF, DOC, or DOCX up to 5MB","settings":{"file":{"multiple":false,"allowedExtensions":["pdf","doc","docx"],"maxFileSize":5242880}},"validation":{"fileTypes":["pdf","doc","docx"],"maxFileSize":5242880}},"commonPatterns":["Set maxFileSize in bytes (5242880 = 5MB)","Specify allowedExtensions array","Use accept MIME types for browser filtering"]},"signature":{"description":"Digital signature capture field for consent or agreement.","useCases":["Contract or agreement signatures","Consent forms","Legal document signing"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about signature","examples":["Sign with your mouse or touch"]}},"exampleJSON":{"id":"signature-field","type":"signature","label":"Digital Signature","required":true,"description":"Please sign to confirm your agreement"},"commonPatterns":["Typically required for legal agreements","Use clear description explaining why signature is needed","Often combined with terms acceptance checkbox"]},"address":{"description":"Structured address input field with street, city, state, zip, country.","useCases":["Shipping or billing addresses","Location collection","Contact information forms"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about address","examples":["Enter your complete address"]},"settings":{"type":"object","description":"Address field configuration","examples":[{"address":{"fields":["street","city","state","zip","country"],"autocomplete":true,"countryRestriction":["US","CA"],"placeholders":{"street":"123 Main St","city":"City","state":"State","zip":"12345","country":"Country"}}}]}},"exampleJSON":{"id":"shipping-address","type":"address","label":"Shipping Address","required":true,"settings":{"address":{"fields":["street","city","state","zip","country"],"autocomplete":true,"countryRestriction":["US","CA","MX"]}}},"commonPatterns":["Specify which fields to include in fields array","Enable autocomplete for better UX","Use countryRestriction to limit countries"]},"name":{"description":"Structured name field with first, last, and optional middle name, prefix, suffix.","useCases":["Full name collection with proper structure","Formal name entry","Legal name requirements"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about name","examples":["Enter your legal name"]},"settings":{"type":"object","description":"Name field configuration","examples":[{"name":{"includeMiddle":true,"includePrefix":true,"includeSuffix":false,"prefixOptions":["Mr.","Mrs.","Ms.","Dr."],"placeholders":{"prefix":"Title","first":"First Name","middle":"Middle Name","last":"Last Name"}}}]}},"exampleJSON":{"id":"full-name","type":"name","label":"Full Name","required":true,"settings":{"name":{"includeMiddle":true,"includePrefix":true,"prefixOptions":["Mr.","Mrs.","Ms.","Dr.","Prof."]}}},"commonPatterns":["Enable includeMiddle, includePrefix, includeSuffix as needed","Provide prefixOptions array for dropdown","Use for formal or legal name collection"]},"table":{"description":"Editable table field for structured data entry with rows and columns.","useCases":["Multiple entries with same structure (expenses, items)","Structured data collection","Repeating information"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about table","examples":["Enter your expenses below"]},"settings":{"type":"object","description":"Table configuration","examples":[{"table":{"rows":3,"columns":[{"label":"Item","type":"text"},{"label":"Amount","type":"number"},{"label":"Date","type":"date"}],"allowAddRows":true,"cellPlaceholders":{"0_0":"Enter item name","0_1":"Enter amount"}}}]}},"exampleJSON":{"id":"expenses-table","type":"table","label":"Monthly Expenses","required":true,"settings":{"table":{"rows":3,"columns":[{"label":"Category","type":"text"},{"label":"Amount","type":"number"}],"allowAddRows":true}}},"commonPatterns":["Set initial rows count","Define columns with label and type","Enable allowAddRows for dynamic expansion"]},"document-extraction":{"description":"AI-powered document extraction field that uses AI to extract structured data from uploaded documents (PDFs, images).","useCases":["Resume/CV data extraction","Invoice or receipt processing","Form data extraction from documents","ID or certificate information extraction"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about document upload and extraction","examples":["Upload your resume and we'll extract the information automatically"]},"settings":{"type":"object","description":"Document extraction configuration","examples":[{"documentExtraction":{"customFields":[{"id":"firstName","name":"First Name","description":"First name of the candidate","fieldType":"single_value","required":true,"editable":true},{"id":"experience","name":"Experience","description":"Work experience entries","fieldType":"list","required":true,"editable":true}],"acceptedFileTypes":["pdf","doc","docx","txt","png","jpg","jpeg"],"maxFileSize":10485760,"extractionPrompt":"Extract all relevant information from this resume","verificationPrompt":"Verify that all required fields have been extracted accurately"}}]}},"exampleJSON":{"id":"resume-extraction","type":"document-extraction","label":"Upload Resume","required":true,"description":"Upload your resume and we'll extract your information","settings":{"documentExtraction":{"customFields":[{"id":"firstName","name":"First Name","description":"First name","fieldType":"single_value","required":true,"editable":true},{"id":"email","name":"Email","description":"Email address","fieldType":"single_value","required":true,"editable":true}],"acceptedFileTypes":["pdf","png","jpg","jpeg"],"maxFileSize":10485760}}},"commonPatterns":["Define customFields array with field definitions","Use fieldType: 'single_value', 'list', 'number', or 'date'","Set acceptedFileTypes and maxFileSize appropriately","Custom prompts can improve extraction accuracy"],"notes":["This field requires AI backend service to be configured","Extraction happens automatically after file upload","Users can edit extracted data before submission"]},"divider":{"description":"Visual divider/separator to break up form sections (non-interactive).","useCases":["Separating form sections visually","Breaking up long forms","Grouping related fields"],"requiredProperties":["id","type"],"optionalProperties":{},"exampleJSON":{"id":"section-divider","type":"divider"},"commonPatterns":["Use between logical sections","No label or required property needed","Purely visual element"]},"text-block":{"description":"Rich text content block for instructions, information, or formatted text (non-interactive).","useCases":["Form instructions or guidelines","Terms and conditions text","Information or help text","Section introductions"],"requiredProperties":["id","type","content"],"optionalProperties":{"content":{"type":"string","description":"HTML or plain text content to display","examples":["<p>Please read the instructions carefully.</p>","Welcome to our form!"]}},"exampleJSON":{"id":"instructions-block","type":"text-block","content":"<h3>Instructions</h3><p>Please fill out all required fields marked with an asterisk.</p>"},"commonPatterns":["Use content property for HTML or plain text","Great for instructions or information","Not a form input field"]},"ending-screen":{"description":"Custom ending/thank you screen shown after form submission.","useCases":["Thank you messages","Redirect instructions","Next steps information"],"requiredProperties":["id","type"],"optionalProperties":{"settings":{"type":"object","description":"Ending screen configuration","examples":[{"endingScreen":{"title":"Thank You!","message":"Your response has been submitted successfully.","showSubmitAnother":true,"redirectUrl":"https://example.com","redirectDelay":5,"buttonText":"Continue","buttonUrl":"https://example.com/dashboard"}}]}},"exampleJSON":{"id":"thank-you-screen","type":"ending-screen","settings":{"endingScreen":{"title":"Thank You!","message":"We've received your submission.","showSubmitAnother":false,"buttonText":"Return to Home","buttonUrl":"https://example.com"}}},"commonPatterns":["Place as last field in form","Customize title and message","Use redirectUrl for automatic redirect","Set redirectDelay in seconds (0 = immediate)"]},"hidden":{"description":"Hidden field for storing data not visible to users (tracking, metadata).","useCases":["Storing tracking IDs or metadata","Pre-filled values from URL parameters","Internal data not shown to users"],"requiredProperties":["id","type"],"optionalProperties":{"settings":{"type":"object","description":"Hidden field configuration","examples":[{"hidden":{"defaultValue":"tracking-value","dynamicValue":"field-id-reference"}}]}},"exampleJSON":{"id":"source-tracking","type":"hidden","settings":{"hidden":{"defaultValue":"website"}}},"commonPatterns":["Use defaultValue for static values","Use dynamicValue to reference another field","No label or visible properties needed"]},"payment":{"description":"Payment field for collecting payment information (requires payment integration).","useCases":["Payment forms","Donation forms","Purchase or checkout forms"],"requiredProperties":["id","type","label","required"],"optionalProperties":{"description":{"type":"string","description":"Helper text about payment","examples":["Secure payment processing"]}},"exampleJSON":{"id":"payment-field","type":"payment","label":"Payment Information","required":true,"description":"Enter your payment details"},"commonPatterns":["Requires payment gateway integration","Typically used with payment processors","Ensure secure handling of payment data"],"notes":["Payment processing requires additional backend configuration","Comply with PCI DSS requirements","Use secure payment processors"]}},"conditionalLogic":{"overview":"Conditional logic allows forms to dynamically show, hide, or validate fields based on user responses. \nThis creates personalized, interactive forms that adapt to user input. Conditional logic consists of:\n- Conditions: Rules that check field values using operators\n- Actions: What happens when conditions are met (show, hide, validate, cap_responses)\n- Logic Operators: How multiple conditions are combined (AND, OR)","operators":{"equals":{"name":"equals","description":"Checks if field value exactly matches the specified value (case-insensitive for text)","applicableFieldTypes":["text","textarea","email","tel","url","select","radio","checkbox","date","number","toggle"],"requiresValue":true,"requiresSecondValue":false,"example":{"condition":{"fieldId":"account-type","operator":"equals","value":"Business"},"explanation":"Shows field when 'account-type' field equals 'Business'"}},"not_equals":{"name":"not_equals","description":"Checks if field value does NOT match the specified value","applicableFieldTypes":["text","textarea","email","tel","url","select","radio","checkbox","date","number","toggle"],"requiresValue":true,"requiresSecondValue":false,"example":{"condition":{"fieldId":"country","operator":"not_equals","value":"United States"},"explanation":"Shows field when country is NOT 'United States'"}},"contains":{"name":"contains","description":"Checks if field value contains the specified substring (case-insensitive). For checkbox fields, checks if the value is in the selected array","applicableFieldTypes":["text","textarea","email","checkbox"],"requiresValue":true,"requiresSecondValue":false,"example":{"condition":{"fieldId":"interests","operator":"contains","value":"Technology"},"explanation":"Shows field when 'interests' checkbox field includes 'Technology' option"}},"not_contains":{"name":"not_contains","description":"Checks if field value does NOT contain the specified substring","applicableFieldTypes":["text","textarea","email","checkbox"],"requiresValue":true,"requiresSecondValue":false,"example":{"condition":{"fieldId":"email","operator":"not_contains","value":"@gmail.com"},"explanation":"Shows field when email does NOT contain '@gmail.com'"}},"starts_with":{"name":"starts_with","description":"Checks if field value starts with the specified string","applicableFieldTypes":["text","textarea","email","url"],"requiresValue":true,"requiresSecondValue":false,"example":{"condition":{"fieldId":"website","operator":"starts_with","value":"https://"},"explanation":"Shows field when website URL starts with 'https://'"}},"ends_with":{"name":"ends_with","description":"Checks if field value ends with the specified string","applicableFieldTypes":["text","textarea","email","url"],"requiresValue":true,"requiresSecondValue":false,"example":{"condition":{"fieldId":"email","operator":"ends_with","value":".edu"},"explanation":"Shows field when email ends with '.edu' (educational domain)"}},"greater_than":{"name":"greater_than","description":"Checks if numeric or date value is greater than the specified value","applicableFieldTypes":["number","date","slider","rating","nps"],"requiresValue":true,"requiresSecondValue":false,"example":{"condition":{"fieldId":"age","operator":"greater_than","value":18},"explanation":"Shows field when age is greater than 18"}},"less_than":{"name":"less_than","description":"Checks if numeric or date value is less than the specified value","applicableFieldTypes":["number","date","slider","rating","nps"],"requiresValue":true,"requiresSecondValue":false,"example":{"condition":{"fieldId":"age","operator":"less_than","value":65},"explanation":"Shows field when age is less than 65"}},"between":{"name":"between","description":"Checks if numeric or date value is between two values (inclusive)","applicableFieldTypes":["number","date","slider"],"requiresValue":true,"requiresSecondValue":true,"example":{"condition":{"fieldId":"age","operator":"between","value":18,"secondValue":65},"explanation":"Shows field when age is between 18 and 65 (inclusive)"}},"is_empty":{"name":"is_empty","description":"Checks if field is empty (null, undefined, empty string, or empty array)","applicableFieldTypes":["text","textarea","email","tel","url","select","radio","checkbox","file","signature","date","number"],"requiresValue":false,"requiresSecondValue":false,"example":{"condition":{"fieldId":"optional-field","operator":"is_empty"},"explanation":"Shows field when 'optional-field' is empty"}},"is_not_empty":{"name":"is_not_empty","description":"Checks if field has a value (not empty)","applicableFieldTypes":["text","textarea","email","tel","url","select","radio","checkbox","file","signature","date","number"],"requiresValue":false,"requiresSecondValue":false,"example":{"condition":{"fieldId":"phone","operator":"is_not_empty"},"explanation":"Shows field when 'phone' field has a value"}},"matches_pattern":{"name":"matches_pattern","description":"Checks if field value matches a regular expression pattern","applicableFieldTypes":["text","textarea","email","tel","url"],"requiresValue":false,"requiresSecondValue":false,"example":{"condition":{"fieldId":"phone","operator":"matches_pattern","pattern":"^\\+?[1-9]\\d{1,14}$"},"explanation":"Shows field when phone matches international phone format pattern"}},"has_same_prefix_as":{"name":"has_same_prefix_as","description":"Checks if field value has the same prefix as another field's value","applicableFieldTypes":["text","textarea"],"requiresValue":false,"requiresSecondValue":false,"example":{"condition":{"fieldId":"reference-field","operator":"has_same_prefix_as","prefixLength":3},"explanation":"Shows field when current field's first 3 characters match reference field's first 3 characters"}}},"actions":{"show":{"name":"show","description":"Show this field ONLY when conditions are met. Field is hidden by default.","useCases":["Show additional fields based on selection","Progressive disclosure of form sections","Conditional questions"],"example":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"account-type","operator":"equals","value":"Business"}]}},"hide":{"name":"hide","description":"Hide this field when conditions are met. Field is visible by default.","useCases":["Hide irrelevant fields based on selection","Simplify form based on user type","Conditional field hiding"],"example":{"enabled":true,"action":"hide","operator":"OR","conditions":[{"fieldId":"country","operator":"equals","value":"United States"}]}},"validate":{"name":"validate","description":"Apply additional validation when conditions are met. Field is always visible but validation rules change.","useCases":["Conditional validation rules","Context-dependent validation","Dynamic validation messages"],"example":{"enabled":true,"action":"validate","operator":"AND","conditions":[{"fieldId":"account-type","operator":"equals","value":"Business"}],"validationMessage":"Business accounts require a company name"}},"cap_responses":{"name":"cap_responses","description":"Limit the number of responses allowed for specific options. Useful for limiting sign-ups or registrations.","useCases":["Limited capacity events","Restricted option availability","Response quotas"],"example":{"enabled":true,"action":"cap_responses","operator":"AND","conditions":[{"fieldId":"event-session","operator":"equals","value":"Morning Session"}],"responseCap":{"enabled":true,"maxResponses":50,"perOptionCaps":{"Morning Session":30,"Afternoon Session":20}}}}},"logicOperators":{"AND":{"description":"All conditions must be true for the logic to trigger. Use when you need multiple requirements.","example":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"age","operator":"greater_than","value":18},{"fieldId":"country","operator":"equals","value":"United States"}]}},"OR":{"description":"At least one condition must be true for the logic to trigger. Use when any of several conditions should trigger the action.","example":{"enabled":true,"action":"show","operator":"OR","conditions":[{"fieldId":"user-type","operator":"equals","value":"Student"},{"fieldId":"user-type","operator":"equals","value":"Senior"}]}}},"examples":[{"title":"Simple Show/Hide Based on Selection","description":"Show a field when a specific option is selected","useCase":"Show 'Company Name' field only when account type is 'Business'","json":{"id":"company-name-field","type":"text","label":"Company Name","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"account-type-field","operator":"equals","value":"Business"}]}},"explanation":"The company name field will only appear when the user selects 'Business' as their account type."},{"title":"Multiple Conditions with AND","description":"Show field when multiple conditions are met","useCase":"Show 'Student ID' field only for students under 25","json":{"id":"student-id-field","type":"text","label":"Student ID","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"user-type-field","operator":"equals","value":"Student"},{"fieldId":"age-field","operator":"less_than","value":25}]}},"explanation":"Both conditions must be true: user must be a Student AND age must be less than 25."},{"title":"Multiple Conditions with OR","description":"Show field when any of several conditions is met","useCase":"Show 'Discount Code' field for students or seniors","json":{"id":"discount-code-field","type":"text","label":"Discount Code","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"OR","conditions":[{"fieldId":"user-type-field","operator":"equals","value":"Student"},{"fieldId":"age-field","operator":"greater_than","value":65}]}},"explanation":"Field appears if user is a Student OR age is greater than 65 (either condition works)."},{"title":"Pattern Matching","description":"Use regex pattern to match field values","useCase":"Show field when email doesn't end with .com","json":{"id":"international-shipping-field","type":"checkbox","label":"International Shipping Options","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"email-field","operator":"matches_pattern","pattern":"^.*(?<!\\.com)$"}]}},"explanation":"Uses regex pattern to check if email does NOT end with .com domain."},{"title":"Numeric Range Check","description":"Show field based on numeric value range","useCase":"Show 'Senior Discount' field for ages 65 and above","json":{"id":"senior-discount-field","type":"checkbox","label":"Apply Senior Discount","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"age-field","operator":"greater_than","value":64}]}},"explanation":"Shows discount option when age is greater than 64 (65 and above)."},{"title":"Checkbox Contains Check","description":"Show field when checkbox includes specific option","useCase":"Show 'Technology Details' when user selects 'Technology' interest","json":{"id":"tech-details-field","type":"textarea","label":"Technology Interests Details","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"interests-field","operator":"contains","value":"Technology"}]}},"explanation":"Shows additional details field when 'Technology' is selected in the interests checkbox field."},{"title":"Conditional Validation","description":"Apply validation rules conditionally","useCase":"Require company name only for business accounts","json":{"id":"company-name-field","type":"text","label":"Company Name","required":false,"conditionalLogic":{"enabled":true,"action":"validate","operator":"AND","conditions":[{"fieldId":"account-type-field","operator":"equals","value":"Business"}],"validationMessage":"Company name is required for business accounts"}},"explanation":"Field is always visible, but validation (making it required) only applies when account type is Business."},{"title":"Response Capping","description":"Limit responses for specific options","useCase":"Limit 'Morning Session' to 30 registrations","json":{"id":"event-session-field","type":"radio","label":"Select Session","required":true,"options":["Morning Session","Afternoon Session","Evening Session"],"conditionalLogic":{"enabled":true,"action":"cap_responses","operator":"AND","conditions":[{"fieldId":"event-session-field","operator":"equals","value":"Morning Session"}],"responseCap":{"enabled":true,"maxResponses":50,"perOptionCaps":{"Morning Session":30,"Afternoon Session":20}}}},"explanation":"Limits Morning Session to 30 responses and Afternoon Session to 20, with overall max of 50."},{"title":"Date Range Check","description":"Show field based on date selection","useCase":"Show 'Early Bird Discount' for registrations before a certain date","json":{"id":"early-bird-field","type":"checkbox","label":"Apply Early Bird Discount","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"registration-date-field","operator":"less_than","value":"2024-12-31"}]}},"explanation":"Shows early bird discount option when registration date is before December 31, 2024."},{"title":"Complex Multi-Condition Logic","description":"Combine multiple field checks with AND/OR","useCase":"Show 'International Shipping' for non-US customers OR customers with premium membership","json":{"id":"international-shipping-field","type":"checkbox","label":"International Shipping","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"OR","conditions":[{"fieldId":"country-field","operator":"not_equals","value":"United States"},{"fieldId":"membership-type-field","operator":"equals","value":"Premium"}]}},"explanation":"Field appears if country is NOT United States OR if membership type is Premium (either condition)."}],"bestPractices":["Place controlling fields (those used in conditions) before dependent fields in the form order","Use 'show' action for progressive disclosure (hiding fields by default)","Use 'hide' action to simplify forms by removing irrelevant fields","Keep conditional logic simple - avoid deeply nested dependencies","Test all conditional logic paths in preview mode","Use AND when all conditions must be met, OR when any condition should trigger","For checkbox fields, use 'contains' operator to check if option is selected","Use 'is_empty' and 'is_not_empty' for optional field dependencies","Pattern matching with regex is powerful but should be used carefully","Response capping requires backend support and should be used for limited capacity scenarios","Avoid circular dependencies (Field A depends on B, B depends on A)","Consider user experience - don't hide required fields behind complex logic","Use clear field labels for controlling fields to help users understand dependencies"]},"aiFields":{"documentExtraction":{"fieldType":"document-extraction","description":"AI-powered field that automatically extracts structured data from uploaded documents (PDFs, images) using vision language models. \nThe field uploads a document, sends it to an AI service, and extracts data based on custom field definitions. \nUsers can review and edit the extracted data before submission.","useCases":["Resume/CV data extraction for job applications","Invoice or receipt processing for expense tracking","ID card or certificate information extraction","Form data extraction from scanned documents","Medical record or prescription data extraction","Contract or agreement data extraction"],"configuration":{"customFields":{"description":"Define the fields you want to extract from the document. Each field specifies what data to extract, its type, and whether it's required.\nFields are defined as an array of DocumentExtractionField objects.","structure":{"id":"string - Unique identifier for the field","name":"string - Human-readable field name","description":"string - Description of what to extract (used in AI prompt)","fieldType":"'single_value' | 'list' | 'number' | 'date' - Type of data to extract","required":"boolean - Whether this field must be extracted","editable":"boolean - Whether user can edit extracted value"},"fieldTypes":{"single_value":{"description":"Extract a single text value (e.g., name, email, address)","example":{"id":"firstName","name":"First Name","description":"First name of the person","fieldType":"single_value","required":true,"editable":true}},"list":{"description":"Extract an array of items (e.g., skills, experience entries, line items)","example":{"id":"skills","name":"Skills","description":"List of technical and professional skills","fieldType":"list","required":true,"editable":true}},"number":{"description":"Extract a numeric value (e.g., amount, quantity, score)","example":{"id":"totalAmount","name":"Total Amount","description":"Total invoice amount in dollars","fieldType":"number","required":true,"editable":true}},"date":{"description":"Extract a date value in YYYY-MM-DD format (e.g., birth date, issue date)","example":{"id":"issueDate","name":"Issue Date","description":"Date when the document was issued","fieldType":"date","required":false,"editable":true}}}},"acceptedFileTypes":{"description":"Array of file extensions that are accepted for upload. Common types: pdf, png, jpg, jpeg","options":["pdf","png","jpg","jpeg"],"default":["pdf","png","jpg","jpeg"]},"maxFileSize":{"description":"Maximum file size in bytes. Default is 10MB (10485760 bytes). Common sizes: 5MB = 5242880, 10MB = 10485760, 20MB = 20971520","default":10485760,"unit":"bytes"},"customPrompts":{"extractionPrompt":{"description":"Custom prompt to guide the AI extraction. Overrides default extraction instructions. Use this to provide context or specific extraction requirements.","example":"Extract all information from this resume. Pay special attention to technical skills and years of experience. Include any certifications mentioned."},"verificationPrompt":{"description":"Custom prompt for verifying extraction quality. Used to check if all required fields were extracted accurately.","example":"Verify that all required fields have been extracted. Check that dates are in correct format (YYYY-MM-DD) and numbers are properly formatted."}}},"exampleConfigurations":[{"useCase":"Resume/CV Extraction","description":"Extract candidate information from resumes for job applications","json":{"id":"resume-upload","type":"document-extraction","label":"Upload Your Resume","required":true,"description":"Upload your resume and we'll automatically extract your information","settings":{"documentExtraction":{"customFields":[{"id":"firstName","name":"First Name","description":"First name of the candidate","fieldType":"single_value","required":true,"editable":true},{"id":"lastName","name":"Last Name","description":"Last name of the candidate","fieldType":"single_value","required":true,"editable":true},{"id":"email","name":"Email","description":"Email address of the candidate","fieldType":"single_value","required":true,"editable":true},{"id":"phone","name":"Phone","description":"Phone number of the candidate","fieldType":"single_value","required":true,"editable":true},{"id":"summary","name":"Professional Summary","description":"Professional summary or objective statement","fieldType":"single_value","required":false,"editable":true},{"id":"experience","name":"Work Experience","description":"Work experience entries with job title, company, dates, and description","fieldType":"list","required":true,"editable":true},{"id":"education","name":"Education","description":"Educational background with degree, institution, and graduation year","fieldType":"list","required":true,"editable":true},{"id":"skills","name":"Skills","description":"Technical and professional skills","fieldType":"list","required":true,"editable":true},{"id":"certifications","name":"Certifications","description":"Professional certifications with name, issuing organization, and date","fieldType":"list","required":false,"editable":true}],"acceptedFileTypes":["pdf","doc","docx","txt","png","jpg","jpeg"],"maxFileSize":10485760,"extractionPrompt":"Extract all information from this resume. Pay special attention to technical skills, years of experience, and educational background.","verificationPrompt":"Verify that all required fields have been extracted accurately, especially contact information and work experience."}}}},{"useCase":"Invoice Extraction","description":"Extract data from invoices for expense tracking or accounting","json":{"id":"invoice-upload","type":"document-extraction","label":"Upload Invoice","required":true,"description":"Upload your invoice and we'll extract the details automatically","settings":{"documentExtraction":{"customFields":[{"id":"vendorName","name":"Vendor Name","description":"Name of the vendor or supplier","fieldType":"single_value","required":true,"editable":true},{"id":"invoiceNumber","name":"Invoice Number","description":"Invoice number or reference","fieldType":"single_value","required":true,"editable":true},{"id":"invoiceDate","name":"Invoice Date","description":"Date when the invoice was issued","fieldType":"date","required":true,"editable":true},{"id":"dueDate","name":"Due Date","description":"Payment due date","fieldType":"date","required":false,"editable":true},{"id":"lineItems","name":"Line Items","description":"List of items with descriptions and amounts","fieldType":"list","required":true,"editable":true},{"id":"subtotal","name":"Subtotal","description":"Subtotal amount before tax","fieldType":"number","required":false,"editable":true},{"id":"taxAmount","name":"Tax Amount","description":"Tax amount","fieldType":"number","required":false,"editable":true},{"id":"totalAmount","name":"Total Amount","description":"Total invoice amount","fieldType":"number","required":true,"editable":true}],"acceptedFileTypes":["pdf","png","jpg","jpeg"],"maxFileSize":10485760,"extractionPrompt":"Extract all invoice details including vendor information, dates, line items, and amounts. Pay attention to currency and number formatting.","verificationPrompt":"Verify that all monetary amounts are correctly extracted and formatted, and that dates are in YYYY-MM-DD format."}}}},{"useCase":"ID Card Extraction","description":"Extract information from ID cards or driver's licenses","json":{"id":"id-upload","type":"document-extraction","label":"Upload ID Card","required":true,"description":"Upload a clear photo of your ID card","settings":{"documentExtraction":{"customFields":[{"id":"fullName","name":"Full Name","description":"Full name as it appears on the ID","fieldType":"single_value","required":true,"editable":true},{"id":"dateOfBirth","name":"Date of Birth","description":"Date of birth","fieldType":"date","required":true,"editable":true},{"id":"idNumber","name":"ID Number","description":"ID or license number","fieldType":"single_value","required":true,"editable":true},{"id":"issueDate","name":"Issue Date","description":"Date when ID was issued","fieldType":"date","required":false,"editable":true},{"id":"expiryDate","name":"Expiry Date","description":"Expiration date of the ID","fieldType":"date","required":false,"editable":true},{"id":"address","name":"Address","description":"Address as shown on the ID","fieldType":"single_value","required":false,"editable":true}],"acceptedFileTypes":["png","jpg","jpeg"],"maxFileSize":5242880,"extractionPrompt":"Extract all visible information from this ID card. Pay special attention to names, dates, and ID numbers. Ensure dates are in YYYY-MM-DD format.","verificationPrompt":"Verify that all dates are correctly formatted and that ID numbers are accurately extracted."}}}},{"useCase":"Receipt Extraction","description":"Extract data from receipts for expense tracking","json":{"id":"receipt-upload","type":"document-extraction","label":"Upload Receipt","required":true,"description":"Upload a photo of your receipt","settings":{"documentExtraction":{"customFields":[{"id":"merchantName","name":"Merchant Name","description":"Name of the store or merchant","fieldType":"single_value","required":true,"editable":true},{"id":"purchaseDate","name":"Purchase Date","description":"Date of purchase","fieldType":"date","required":true,"editable":true},{"id":"items","name":"Items","description":"List of purchased items with descriptions","fieldType":"list","required":true,"editable":true},{"id":"totalAmount","name":"Total Amount","description":"Total amount paid","fieldType":"number","required":true,"editable":true},{"id":"paymentMethod","name":"Payment Method","description":"Method of payment (cash, card, etc.)","fieldType":"single_value","required":false,"editable":true}],"acceptedFileTypes":["png","jpg","jpeg"],"maxFileSize":5242880,"extractionPrompt":"Extract all information from this receipt including merchant name, purchase date, items purchased, and total amount.","verificationPrompt":"Verify that the total amount matches the sum of items and that dates are in YYYY-MM-DD format."}}}}]}},"exampleForms":[{"title":"Simple Contact Form","description":"Basic contact form with name, email, message, and optional phone","useCase":"Website contact forms, customer support, general inquiries","json":{"title":"Contact Us","description":"Get in touch with us","fields":[{"id":"name","type":"text","label":"Full Name","placeholder":"Enter your name","required":true,"description":"We'll use this to address you"},{"id":"email","type":"email","label":"Email Address","placeholder":"you@example.com","required":true,"description":"We'll respond to this email"},{"id":"phone","type":"tel","label":"Phone Number","placeholder":"+1 (555) 123-4567","required":false,"settings":{"phone":{"defaultCountry":"US"}}},{"id":"message","type":"textarea","label":"Message","placeholder":"Enter your message...","required":true,"validation":{"minLength":10,"maxLength":1000}}]},"featuresUsed":["text","email","tel","textarea","validation"],"explanation":"A straightforward contact form with basic validation. Uses text for name, email for email validation, tel for phone with country code, and textarea for longer messages."},{"title":"Job Application Form with Resume Extraction","description":"Complete job application form with AI-powered resume extraction","useCase":"Job applications, recruitment, hiring processes","json":{"title":"Job Application","description":"Apply for our open position","fields":[{"id":"personal-info-heading","type":"text-block","label":"Personal Information","content":"<p><strong>Personal Information</strong></p><p>Tell us about yourself</p>"},{"id":"full-name","type":"name","label":"Full Name","required":true,"settings":{"name":{"includeMiddle":true,"includePrefix":true,"prefixOptions":["Mr.","Mrs.","Ms.","Dr."]}}},{"id":"email","type":"email","label":"Email Address","required":true,"placeholder":"you@example.com"},{"id":"phone","type":"tel","label":"Phone Number","required":true,"settings":{"phone":{"defaultCountry":"US"}}},{"id":"resume-upload","type":"document-extraction","label":"Upload Resume","required":true,"description":"Upload your resume and we'll extract your information automatically","settings":{"documentExtraction":{"customFields":[{"id":"firstName","name":"First Name","description":"First name","fieldType":"single_value","required":true,"editable":true},{"id":"email","name":"Email","description":"Email address","fieldType":"single_value","required":true,"editable":true},{"id":"experience","name":"Experience","description":"Work experience entries","fieldType":"list","required":true,"editable":true},{"id":"education","name":"Education","description":"Educational background","fieldType":"list","required":true,"editable":true},{"id":"skills","name":"Skills","description":"Technical and professional skills","fieldType":"list","required":true,"editable":true}],"acceptedFileTypes":["pdf","png","jpg","jpeg"],"maxFileSize":10485760}}},{"id":"cover-letter","type":"textarea","label":"Cover Letter","required":false,"placeholder":"Tell us why you're interested in this position...","validation":{"maxLength":2000}},{"id":"availability","type":"date","label":"Available Start Date","required":false},{"id":"salary-expectation","type":"number","label":"Salary Expectation (USD)","required":false,"placeholder":"50000","validation":{"min":0}}]},"featuresUsed":["name","email","tel","document-extraction","textarea","date","number","text-block"],"explanation":"Comprehensive job application form with AI-powered resume extraction. Uses name field for structured name input, document-extraction for automatic resume parsing, and various other fields for additional information."},{"title":"Customer Satisfaction Survey with Conditional Logic","description":"Survey form with conditional questions based on responses","useCase":"Customer feedback, satisfaction surveys, NPS measurement","json":{"title":"Customer Satisfaction Survey","description":"Help us improve by sharing your feedback","fields":[{"id":"overall-satisfaction","type":"rating","label":"Overall Satisfaction","required":true,"settings":{"rating":{"max":5,"icon":"star","minLabel":"Very Dissatisfied","maxLabel":"Very Satisfied"}}},{"id":"nps-score","type":"nps","label":"How likely are you to recommend us to a friend?","required":true,"settings":{"nps":{"minLabel":"Not at all likely","maxLabel":"Extremely likely","showLabels":true}}},{"id":"would-recommend","type":"radio","label":"Would you recommend us?","required":true,"options":["Yes","No","Maybe"]},{"id":"recommendation-details","type":"textarea","label":"What would make you more likely to recommend us?","required":false,"placeholder":"Share your thoughts...","conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"would-recommend","operator":"not_equals","value":"Yes"}]}},{"id":"satisfaction-aspects","type":"matrix","label":"Rate different aspects","required":true,"settings":{"matrix":{"inputType":"radio","rowLabels":["Product Quality","Customer Service","Price","Ease of Use"],"columnLabels":["Poor","Fair","Good","Very Good","Excellent"]}}},{"id":"improvement-areas","type":"checkbox","label":"What should we improve?","required":false,"options":["Product Features","Customer Support","Pricing","Documentation","Performance"],"description":"Select all that apply"},{"id":"additional-feedback","type":"textarea","label":"Additional Comments","required":false,"placeholder":"Any other feedback?","validation":{"maxLength":500}}]},"featuresUsed":["rating","nps","radio","matrix","checkbox","textarea","conditionalLogic"],"explanation":"Comprehensive survey with multiple question types. Uses conditional logic to show 'recommendation-details' only when user doesn't select 'Yes'. Includes NPS score, rating scales, and matrix for multi-dimensional feedback."},{"title":"Event Registration Form","description":"Multi-page event registration with conditional fields","useCase":"Event registrations, conference sign-ups, workshop bookings","json":{"title":"Event Registration","description":"Register for our upcoming event","settings":{"pages":[{"id":"page_personal","title":"Personal Information","description":"Tell us about yourself","fieldIds":["full-name","email","phone"]},{"id":"page_event","title":"Event Details","description":"Select your preferences","fieldIds":["event-type","session-preference","dietary-restrictions","special-requirements"]},{"id":"page_payment","title":"Payment","description":"Complete your registration","fieldIds":["payment-method","billing-address"]}]},"fields":[{"id":"full-name","type":"name","label":"Full Name","required":true,"settings":{"name":{"includeMiddle":false,"includePrefix":true,"prefixOptions":["Mr.","Mrs.","Ms.","Dr."]}}},{"id":"email","type":"email","label":"Email Address","required":true},{"id":"phone","type":"tel","label":"Phone Number","required":true,"settings":{"phone":{"defaultCountry":"US"}}},{"id":"event-type","type":"radio","label":"Event Type","required":true,"options":["Workshop","Conference","Networking Event"]},{"id":"session-preference","type":"radio","label":"Session Preference","required":true,"options":["Morning Session","Afternoon Session","Full Day"],"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"event-type","operator":"equals","value":"Conference"}]}},{"id":"dietary-restrictions","type":"checkbox","label":"Dietary Restrictions","required":false,"options":["Vegetarian","Vegan","Gluten-Free","Kosher","Halal","None"],"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"event-type","operator":"not_equals","value":"Networking Event"}]}},{"id":"special-requirements","type":"textarea","label":"Special Requirements","required":false,"placeholder":"Any accessibility needs or special requests?","conditionalLogic":{"enabled":true,"action":"show","operator":"OR","conditions":[{"fieldId":"dietary-restrictions","operator":"is_not_empty"}]}},{"id":"payment-method","type":"radio","label":"Payment Method","required":true,"options":["Credit Card","PayPal","Bank Transfer"]},{"id":"billing-address","type":"address","label":"Billing Address","required":false,"conditionalLogic":{"enabled":true,"action":"show","operator":"AND","conditions":[{"fieldId":"payment-method","operator":"equals","value":"Credit Card"}]},"settings":{"address":{"fields":["street","city","state","zip","country"],"autocomplete":true}}}]},"featuresUsed":["name","email","tel","radio","checkbox","textarea","address","conditionalLogic","settings.pages"],"explanation":"Multi-page event registration form with conditional logic. Uses form settings.pages to define steps (not page-break fields). Shows session preference only for conferences, dietary restrictions for non-networking events, and billing address only for credit card payments."},{"title":"Product Feedback Form","description":"Product review and feedback collection form","useCase":"Product reviews, feature requests, bug reports","json":{"title":"Product Feedback","description":"Share your thoughts about our product","fields":[{"id":"product-rating","type":"rating","label":"Overall Product Rating","required":true,"settings":{"rating":{"max":5,"icon":"star","minLabel":"Poor","maxLabel":"Excellent"}}},{"id":"feature-ratings","type":"matrix","label":"Rate Product Features","required":true,"settings":{"matrix":{"inputType":"radio","rowLabels":["Ease of Use","Performance","Design","Value for Money"],"columnLabels":["Poor","Fair","Good","Very Good","Excellent"]}}},{"id":"likelihood-to-purchase","type":"nps","label":"How likely are you to purchase again?","required":true,"settings":{"nps":{"minLabel":"Not likely","maxLabel":"Very likely","showLabels":true}}},{"id":"favorite-features","type":"checkbox","label":"Favorite Features","required":false,"options":["User Interface","Performance","Customer Support","Pricing","Documentation"],"description":"Select all that apply"},{"id":"improvement-suggestions","type":"textarea","label":"How can we improve?","required":false,"placeholder":"Share your suggestions...","validation":{"maxLength":1000}},{"id":"would-recommend","type":"toggle","label":"Would you recommend this product?","required":false,"settings":{"toggle":{"trueLabel":"Yes","falseLabel":"No"}}}]},"featuresUsed":["rating","matrix","nps","checkbox","textarea","toggle"],"explanation":"Product feedback form using various rating and feedback collection methods. Includes star rating, matrix for feature ratings, NPS score, checkbox for favorite features, and toggle for recommendation."},{"title":"Application Form with Document Upload","description":"Application form requiring document uploads and signatures","useCase":"Program applications, membership applications, legal forms","json":{"title":"Application Form","description":"Complete your application","fields":[{"id":"applicant-name","type":"name","label":"Applicant Name","required":true,"settings":{"name":{"includeMiddle":true,"includePrefix":true,"prefixOptions":["Mr.","Mrs.","Ms.","Dr."]}}},{"id":"email","type":"email","label":"Email Address","required":true},{"id":"phone","type":"tel","label":"Phone Number","required":true},{"id":"address","type":"address","label":"Mailing Address","required":true,"settings":{"address":{"fields":["street","city","state","zip","country"],"autocomplete":true}}},{"id":"supporting-documents","type":"file","label":"Supporting Documents","required":true,"description":"Upload PDF, DOC, or DOCX files (max 5MB each)","settings":{"file":{"multiple":true,"allowedExtensions":["pdf","doc","docx"],"maxFileSize":5242880}},"validation":{"fileTypes":["pdf","doc","docx"],"maxFileSize":5242880}},{"id":"terms-acceptance","type":"checkbox","label":"I agree to the terms and conditions","required":true,"options":["I have read and agree to the terms"]},{"id":"signature","type":"signature","label":"Digital Signature","required":true,"description":"Please sign to confirm your application"}]},"featuresUsed":["name","email","tel","address","file","checkbox","signature"],"explanation":"Application form with multiple file uploads, structured address input, and digital signature. Uses file field with multiple: true for multiple document uploads, and signature field for legal consent."},{"title":"Quick Poll Form","description":"Simple single-question poll","useCase":"Quick polls, voting, simple surveys","json":{"title":"Quick Poll","description":"Share your opinion","fields":[{"id":"poll-question","type":"radio","label":"What's your favorite programming language?","required":true,"options":["JavaScript","Python","Java","C++","TypeScript","Other"]}]},"featuresUsed":["radio"],"explanation":"Minimal poll form with a single radio button question. Simple and focused on one question."},{"title":"Expense Report Form","description":"Expense tracking form with table input","useCase":"Expense reports, reimbursement requests, budget tracking","json":{"title":"Expense Report","description":"Submit your expense report","fields":[{"id":"employee-name","type":"text","label":"Employee Name","required":true},{"id":"report-date","type":"date","label":"Report Date","required":true},{"id":"expenses-table","type":"table","label":"Expenses","required":true,"settings":{"table":{"rows":5,"columns":[{"label":"Date","type":"date"},{"label":"Category","type":"text"},{"label":"Description","type":"text"},{"label":"Amount","type":"number"}],"allowAddRows":true}}},{"id":"receipts","type":"file","label":"Upload Receipts","required":false,"description":"Upload receipt images (JPG, PNG, PDF)","settings":{"file":{"multiple":true,"allowedExtensions":["jpg","jpeg","png","pdf"],"maxFileSize":5242880}}},{"id":"notes","type":"textarea","label":"Additional Notes","required":false,"placeholder":"Any additional information..."}]},"featuresUsed":["text","date","table","file","textarea"],"explanation":"Expense report form using table field for structured expense entry. Allows multiple rows with date, category, description, and amount. Includes file upload for receipts and notes field for additional information."}],"bestPractices":["Always use appropriate field types for the data being collected","Provide clear, descriptive labels for all fields","Use placeholders to guide user input","Add descriptions for complex fields or when additional context is helpful","Mark fields as required only when necessary","Use conditional logic to create dynamic, personalized forms","Validate input appropriately (min/max length, patterns, ranges)","For choice fields, keep options list reasonable (under 20 items)","Use ending-screen to provide clear completion feedback","For document-extraction, provide clear descriptions for customFields","Test conditional logic to ensure it works as expected","Consider user experience - don't hide required fields behind complex logic","Use validation.customMessage for clearer error messages","Set appropriate file size limits for file upload fields","Use autocomplete for address fields when possible","Provide default values for optional fields when helpful"],"formSchema":{"structure":"{\n  title: string (required) - Form title\n  description?: string (optional) - Form description\n  fields: FormField[] (required) - Array of form fields\n}","requiredFields":["title","fields"],"optionalFields":["description"],"example":{"title":"Example Form","description":"This is an example form","fields":[{"id":"example-field","type":"text","label":"Example Field","required":true,"placeholder":"Enter value"}]}}}