Forms and Submissions
TailStatic allows you to easily add contact forms, surveys, or signup forms to your sites. You don't need to write any server-side code to handle the data; TailStatic does it all for you.
Creating a Form
- Define the Form: In your site dashboard, go to the Forms section and create a new form definition. You can specify the fields you need and set validation rules.
- Add to Template: Create an HTML form with the same fields as you setup in your form. You can either copy sample HTML by clicking on
View Sample Htmlor pass the form's json file to AI service to generate an HTML for you. Set the action of the form to/form/<form_file_name>and method topost. - Configure Notifications: Decide who should receive an email when a new submission arrives.
Tip use ajax to submit the form as it returns JSON response and regular form submit will show JSON to the user.
Storing Submissions
When a visitor submits a form:
- The data is securely stored in the TailStatic database.
- You can view all submissions in the Forms area of the dashboard.
- You can export submissions as a CSV or JSON file for further analysis.
Next Steps
Changes to form definitions are tracked in Versioning and History. You should test your forms in preview mode before you publish them to your live site.
