Forms & Submissions
Add contact forms and capture user submissions on your AI-generated website.
Capture user input with forms—contact forms, newsletter signups, surveys, and more.
Creating Forms
Contact Form
The most common form type:
"Add a contact form with name, email, and message fields. Store submissions in the database."
The AI creates:
- A styled form component
- Validation logic
- Submission handling
- Database table for responses
Newsletter Signup
Simple email capture:
"Add a newsletter signup form in the footer with just an email field"
Custom Forms
Build exactly what you need:
"Create a project inquiry form with:
- Name (required)
- Email (required)
- Company
- Budget (dropdown: <$5k, $5-10k, $10k+)
- Project description (textarea)
- Preferred timeline"
Form Fields
Available Types
| Field Type | Use For |
|---|---|
| Text | Single line input |
| Email with validation | |
| Phone | Phone numbers |
| Textarea | Long text |
| Select | Dropdown options |
| Checkbox | Single yes/no |
| Radio | Multiple choice (one answer) |
| File | File uploads |
Validation
Built-in Validation
Ask for validation rules:
"Make name and email required. Validate email format."
"Message must be at least 50 characters."
Error Messages
Customize error display:
"Show validation errors inline below each field"
"Highlight invalid fields with red border"
Submission Handling
Success States
After form submission:
"Show a success message: 'Thanks! We'll be in touch within 24 hours.'"
"Redirect to a thank you page after submission"
Email Notifications
Get notified of submissions:
"Send an email to [email protected] when someone submits the contact form"
(Requires email integration setup)
Viewing Submissions
In the CMS
All form submissions are stored in your database:
- Open the Database panel
- Find the form submissions table
- View and manage all responses
Anti-Spam
Basic Protection
"Add a honeypot field to prevent spam submissions"
Invisible to users, catches bots.
Next Steps
- Working with the CMS — Manage submissions
- SEO Best Practices — Optimize your site