MxChat Form Collection
Seamlessly collect information from users during chatbot conversations. Create custom forms that trigger automatically based on conversation intent, message count, or user roles—perfect for lead generation, support tickets, and surveys.
Requirements
- MxChat Core Plugin (installed and activated)
- MxChat Pro License (active)
- For intent-based triggers: At least one AI API key configured for embeddings (OpenAI, Voyage AI, or Gemini)
Quick Setup
- Install the Plugin: Upload and activate MxChat Form Collection through your WordPress plugins page
- Verify License: Ensure your MxChat Pro license is active in
MxChat → License Activation - Navigate to Form Collection: Go to
MxChat → Form Collection - Create Your First Form: Click “Create New Form” and add your fields
- Set Trigger Conditions: Choose how the form should appear (intent phrases, message count, or both)
- Save and Test: Save your form and test it in your chatbot
Key Features
Multiple Trigger Methods
- Intent-Based: Trigger forms when users mention specific phrases or topics
- Message Count: Display forms after a specific number of messages
- Combined Triggers: Use both methods together for precise control
- Regex Matching: Advanced pattern matching for complex trigger conditions
Custom Form Builder
- Multiple field types: Text, Email, Phone, Message (textarea)
- Drag-and-drop field reordering
- Required field validation
- Custom form titles and trigger phrases
- Personalized success messages
Smart Form Behavior
- Chat Input Blocking: Prevent users from sending messages until form is submitted
- Role-Based Access: Show forms only to specific user roles (visitors, subscribers, administrators, etc.)
- Adjustable Similarity: Fine-tune intent matching threshold (10-100%)
- Custom Email Notifications: Send submissions to specific email addresses
Submission Management
- View all form submissions in organized table
- Export submissions to CSV
- Automatic chat transcript attachment in notification emails
- Delete individual or all submissions
- Track submission date, user, and session ID
Testing Tools
- Message count tracker and reset function
- Real-time message count display
- Session ID monitoring
Creating Your First Form
- Navigate to Forms: Go to
MxChat → Form Collection - Click “Create New Form”: Opens the form editor
- Set Form Title: Give your form a descriptive name (e.g., “Contact Form”)
- Add Fields: Click “Add Field” buttons to add text, email, phone, or message fields
- Configure Fields: For each field:
- Enter field label (what users see)
- Choose field type
- Check “Required” if the field must be filled
- Use up/down arrows to reorder fields
- Save Form: Click “Save Form” to create it
Form Trigger Methods
Method 1: Intent-Based Triggers
Forms appear when users mention specific topics or phrases in the conversation.
How to set up:
- In the form editor, find “Trigger Phrases”
- Enter phrases that should trigger the form (one per line)
- Example phrases for a contact form:
- contact support
- speak to someone
- get in touch
- need help
- Adjust “Similarity Threshold” (default 85%) – higher values require closer matches
- Save the form
Method 2: Message Count Triggers
Forms appear automatically after users send a specific number of messages.
How to set up:
- In the form editor, find “Trigger After X Messages”
- Enter the number of messages (e.g., 5)
- Leave at 0 to disable message count triggering
- Save the form
Example use case: Set to 10 messages to capture leads from engaged users who have been chatting for a while.
Method 3: Combined Triggers
Use both methods together. The form will appear when EITHER condition is met:
- User mentions a trigger phrase, OR
- User reaches the message count threshold
Method 4: Regex Pattern Matching
Advanced users can add regex patterns for complex matching:
- Find “Regex Pattern (Optional)” field
- Enter a regex pattern (e.g.,
\b(urgent|asap|emergency)\b) - Form triggers only if BOTH similarity match AND regex match succeed
- Leave blank to use similarity matching only
Form Configuration Options
Basic Settings
- Form Title: Name for admin reference (users don’t see this)
- Trigger Phrases: Phrases that trigger the form (one per line)
- Custom Success Message: Message shown after successful submission (default: “Thank you. General response time is within 24h…”)
Advanced Settings
- Trigger After X Messages: Number of messages before form appears (0 = disabled)
- Block Chat Until Submitted: Prevents users from chatting until they complete the form
- Similarity Threshold: How closely user messages must match trigger phrases (10-100%, default 85%)
- Regex Pattern: Optional advanced pattern matching
Access Control
Allowed User Roles: Choose who can see this form
- All Users: Everyone including visitors (default)
- Visitor: Only non-logged-in users
- Subscriber: WordPress subscribers
- Administrator: Site administrators
- Multiple Roles: Select multiple roles (Ctrl/Cmd + Click)
Notifications
- Notification Email: Email address for submission alerts (defaults to WordPress admin email if blank)
- Email Includes: Submission data + complete chat transcript as .txt attachment
- Subject Format: “Form Name | MxChat”
Field Types & Configuration
Available Field Types
Text Field
Single-line text input for names, titles, or short responses
Best for: Name, Company, Subject, City
Email Field
Email input with automatic validation
Best for: Contact email, Reply-to address
Validation: Must be valid email format
Phone Field
Phone number input with format validation
Best for: Contact number, Mobile phone
Validation: Must be 7+ digits, allows spaces, dashes, parentheses
Message Field
Multi-line textarea for longer responses
Best for: Message, Description, Feedback, Details
Field Options
- Field Label: Text shown to users above the field
- Required: Check to make field mandatory (shows red asterisk)
- Field Order: Use up/down arrows to rearrange fields
Managing Submissions
Viewing Submissions
- Go to
MxChat → Form Collection - Click “Submissions” tab
- View table with all form submissions
- Click “View” on any submission to see full details
Submission Data Includes:
- Date and time of submission
- Form name
- User (WordPress user or “Guest”)
- Session ID for tracking
- All form field responses
Export to CSV
- Click “Export to CSV” button
- Downloads file:
form-submissions-YYYY-MM-DD.csv - Open in Excel, Google Sheets, or any spreadsheet software
- Includes all submission data with proper formatting
Delete Submissions
- Delete Individual: Click “Delete” button on specific submission
- Delete All: Click “Delete All Submissions” button (requires double confirmation)
- Submissions are preserved when forms are deleted
Email Notifications
When a form is submitted, an email is automatically sent with:
- Subject line: “Form Name | MxChat”
- All form field data in email body
- Link to view all submissions in admin
- Complete chat transcript attached as .txt file
Testing Your Forms
Message Count Testing Tools
At the top of the Form Collection page, you’ll see testing tools:
- Current Message Count: Shows how many messages you’ve sent
- Session ID: Your current chat session identifier
- Reset Count: Button to reset your message count to 0
- Auto-Refresh: Count updates every 10 seconds automatically
Testing Message Count Triggers
- Create a form with “Trigger After X Messages” set to 3
- Click “Reset Message Count” in testing tools
- Open your chatbot and send 3 messages
- Form should appear after the 3rd message
- Reset count to test again
Testing Intent-Based Triggers
- Create a form with trigger phrase “contact support”
- Open your chatbot
- Type a message containing “contact support”
- Form should appear immediately
- Try similar phrases to test similarity threshold
Testing Chat Blocking
- Create a form with “Block Chat Until Submitted” enabled
- Trigger the form
- Try typing in chat input – should show “Please submit the form above to continue…”
- Submit form – chat input should re-enable
Troubleshooting
Form not triggering with intent phrases
- Check that form is enabled (toggle switch on Forms list)
- Verify you have an embedding API key configured in MxChat settings
- Try lowering similarity threshold (e.g., from 85% to 70%)
- Make trigger phrases more specific and varied
- Check if regex pattern is set and potentially blocking matches
- Ensure user role matches allowed roles setting
Form not triggering after X messages
- Use testing tools to verify current message count
- Ensure “Trigger After X Messages” is set to a number greater than 0
- Check that messages are being counted (refresh testing tools)
- Try resetting message count and starting a fresh test
- Verify user role matches allowed roles setting
Form appears for wrong user roles
- Edit form and check “Allowed User Roles” setting
- “All Users” means everyone including non-logged-in visitors
- For visitors only, select “Visitor” not “All Users”
- Multiple roles can be selected (Ctrl/Cmd + Click)
Email notifications not sending
- Check notification email address is valid
- If blank, uses WordPress admin email
- Check spam folder
- Verify WordPress can send emails (test with password reset email)
- Some hosts require SMTP plugin for reliable email delivery
Chat transcript not attaching to email
- Transcript requires valid session ID
- Check that chat transcripts are being saved in MxChat settings
- Verify WordPress upload directory is writable
- If transcript is empty, no messages were recorded for that session
Regex pattern not working
- Test regex pattern separately before adding to form
- Remember regex must match AND similarity threshold must pass
- Invalid regex patterns are silently ignored
- Don’t include opening/closing slashes in pattern
- Leave regex field blank if not needed
Database issue detected error
- Deactivate MxChat Form Collection plugin
- Reactivate the plugin
- This recreates any missing database columns
- If error persists, contact support with error details
Frequently Asked Questions
How many forms can I create?
Unlimited! Create as many forms as you need for different purposes, pages, or user segments.
Can one user trigger multiple forms?
Yes, but only one form shows at a time. If multiple forms match, the first matching form based on database order will display.
What happens if I delete a form?
The form is deleted but all existing submissions are preserved. You can still view and export old submissions even after deleting the form.
Can I edit a form after submissions exist?
Yes, but note that changing fields won’t affect old submissions. Old submissions retain their original field structure.
Do forms work with Multi-Bot Manager?
Yes! Forms work with all bots created in Multi-Bot Manager. The form system integrates at the core level.
Can visitors submit forms without logging in?
Yes, if “Allowed User Roles” is set to “All Users” or includes “Visitor”. Forms work perfectly for anonymous users.
How does similarity threshold work?
It measures how closely user messages match your trigger phrases using AI embeddings. 85% (default) means fairly close match. Lower values (60-70%) are more lenient, higher values (90-100%) require very close matches.
What embedding models are supported?
The plugin uses whatever embedding model is configured in your main MxChat settings (OpenAI Ada-002, Voyage AI, or Google Gemini embeddings).
Can I customize the form styling?
Forms inherit your chatbot’s styling from the Theme Customizer add-on. Additional custom CSS can be added to your theme.
Is form data stored securely?
Yes, all submissions are stored in your WordPress database with standard WordPress security measures. Data never leaves your server.
Common Use Cases
Lead Generation
Scenario: Capture contact info from interested visitors
Setup: Create form with Name, Email, Company. Trigger after 5 messages or when user asks about pricing/demo. Block chat until submitted.
Support Tickets
Scenario: Collect detailed problem descriptions
Setup: Form with Name, Email, Phone, Problem Description. Trigger phrases: “need help”, “having issue”, “not working”. Don’t block chat – allow continued conversation.
Appointment Scheduling
Scenario: Gather info before scheduling
Setup: Form with Name, Email, Phone, Preferred Date/Time, Reason. Trigger: “book appointment”, “schedule meeting”. Send to specific department email.
Feedback Collection
Scenario: Get feedback from engaged users
Setup: Form with Name (optional), Email (optional), Feedback message. Trigger after 15 messages. Show only to logged-in subscribers.
Emergency Contact
Scenario: Urgent issues need immediate attention
Setup: Form with Name, Phone, Issue description. Trigger phrases: “urgent”, “emergency”, “asap”. Add regex: \b(urgent|emergency)\b. Block chat and send to multiple emails.
Best Practices
Form Design
- Keep forms short – 3-5 fields max for best completion rates
- Only mark truly essential fields as required
- Use clear, concise field labels
- Order fields logically (name/email first, message last)
- Test on mobile devices – forms appear in chat interface
Trigger Configuration
- Use varied trigger phrases (5-10 different ways to say the same thing)
- Start with 85% similarity, adjust based on results
- Message count triggers: 5-10 messages for lead gen, 15+ for feedback
- Test thoroughly before deploying to live site
- Monitor which phrases actually trigger forms
User Experience
- Use chat blocking sparingly – can frustrate users
- Write clear success messages that set expectations
- For time-sensitive forms, mention response time
- Consider user roles – don’t ask logged-in users for info you already have
- Test the complete flow from trigger to submission to email
Data Management
- Export submissions regularly for backup
- Review submissions weekly to spot trends
- Set up email filters for form notifications
- Use specific notification emails for different departments
- Include chat transcripts to understand context
Need Help?
If you’re experiencing issues not covered here:
- Visit MxChat.ai for additional resources
- Check our YouTube channel for video tutorials
- Use the testing tools at the top of Form Collection page to diagnose issues
- Contact MxChat support with your license key, form ID, and detailed description of the issue