User Guides for Freeform
Check out the user guides below to see solutions to common problems and questions:
Form Validation
- Browser Validation with Required AttributeExplains how to control Freeform's `required` field attributes for better accessibility, validation, and customization options.
- Custom Form ValidationShows how to integrate common client-side form validation frameworks such as Bootstrap, Parsley.js and Foundation Abide.
- Preventing Certain Email AddressesShows how to prevent specific email addresses from being submitted in Freeform forms using the Blocked Emails integration.
Dynamic Data
- Passing Dynamic Data to FormsPopularExplains how to pass dynamic data to Freeform forms using Twig variables, custom fields, and context-based data.
- Passing a Custom Property to a Formatting TemplateExplains how to pass custom properties to Freeform form formatting templates using Twig for flexible form rendering.
- Fill Field Values from Query StringDescribes how to populate Freeform form fields dynamically from URL query strings using Twig for pre-filling data.
- Send Email Notifications only in Certain ScenariosExplains how to configure email notifications in Freeform for specific scenarios, like conditional recipients and custom templates.
- Populate Field Options at Template LevelCovers how to populate field options in Freeform forms dynamically at the template level using Twig variables.
- Displaying Submission Data from Previous PagesExplains how to display submission data from previous pages using Freeform's multi-page form functionality
Templating
- AJAX FormsPopularExplains how to enable AJAX form submissions, customize success/error handling, and improve user experience without page reloads.
- Caching FormsPopularDetails how to cache forms properly to prevent issues with CSRF tokens, captchas, CDN's, and Stripe forms.
- Creating a Custom Formatting TemplatePopularShows how you can quickly get started with customizing your own formatting templates.
- Embedding Forms in HTML PagesAdd a Freeform form to a standalone HTML page on the same origin as your Craft site.
- Rendering Form Data as JSONShows how to output form field data as JSON for use in JavaScript, APIs, or dynamic front-end behaviors.
- Line Breaks in Textarea FieldsCovers preserving or converting line breaks in textarea fields for correct display in emails and templates.
- Multiple Instances of the Same FormExplains how to render the same form multiple times on a page without conflicts, using unique IDs and methods.
- Returning Submit to Same PageShows how to make form submissions reload the same page, maintaining query strings and anchor tags if needed.
- Success Return on FormsOutlines how to redirect users to another page, section, or custom URL after successful form submission.
Fields
- Allow Additional File ExtensionsPopularDescribes how to allow custom file types for file upload fields beyond the default permitted extensions.
- Range Slider on Number fieldExplains how to render number fields as HTML range sliders for better user input control.
- Toggle Switch on Checkbox fieldShows how to style checkbox fields as modern toggle switches for enhanced user interface design.
- Color Picker on Text fieldDemonstrates turning text fields into HTML color pickers to allow users to select colors visually.
- TinyMCE Rich Text Editor on Textarea fieldCovers how to embed a TinyMCE rich text editor inside textarea fields for better content formatting.
- Include an "Other" Option for FieldsExplains how to add an "Other" option to dropdowns, radios, or checkboxes with a custom text input.
- Custom File Delete Confirmation DialogShows how to add your own custom delete confirmation dialog for File Upload Drag & Drop fields.
- Parsing HTML in Field OptionsCovers enabling HTML parsing inside field options, allowing advanced customization like icons or inline styling.
Submission Data
- Customizing Submission Columns View in Control PanelDetails how to adjust visible field columns for submissions inside the Freeform control panel.
- Submission Data on Success PageExplains how to access newly created submission data after successful form submissions, especially for redirects or AJAX.
- Display Total Number of Submissions for a FormShows how to display the total count of submissions a form has received using a simple template snippet.
- Storing URL Tracking ParametersShows how to capture and save marketing or referral URL query parameters into form submissions automatically.
Specialty Forms
Best Practices
- How to Stay Informed about FreeformOutlines options for staying updated on Freeform news, releases, tips, and important plugin announcements.
- Form Submitter's Email Address as the Reply-to EmailShows how to set up admin email notifications so replies go directly to the original form submitter.
- Spam ProtectionPopularCovers built-in spam protection methods like honeypots, reCAPTCHA, hCaptcha, and Turnstile, and best practices to reduce spam.
Testing
- Troubleshooting Form IssuesPopularGuide for diagnosing common Freeform issues like AJAX errors, template conflicts, and server misconfigurations.
- Email Testing with MailtrapInstructions for setting up Mailtrap to safely capture and test outgoing form email notifications without sending real emails.
- How to Remove Demo TemplatesQuick guide on how to delete Freeform's demo templates to keep your project clean and organized.
Headless
- How to Render a FormPopularGuide to fetching and displaying Freeform forms using GraphQL queries in headless CMS setups.
- Submitting a File using NextJS + AJAXInstructions for handling file uploads to Freeform forms using a custom API route in a Next.js app.
- Vue.jsOfficial Vue packages for headless Freeform forms, plus legacy GraphQL and AJAX demos.
- React JSOfficial React packages for headless Freeform forms, plus legacy GraphQL and AJAX demos.
- Next.jsOfficial React packages for Next.js App Router / Pages Router with a CSRF-friendly proxy.
Developer
- Can I make my own integrations or fields?PopularIntroduction to building custom integrations that connect Freeform forms to third-party APIs and services.
- Building a custom ModuleStep-by-step guide for creating a custom Freeform module with its own integration logic.
- Building a custom Field TypeInstructions for building custom field types to expand Freeform's form field capabilities.
- Building a custom CRM integrationHow to create custom CRM integrations that push form submission data into customer management platforms.
- Building a custom Email Marketing integrationGuide for creating email marketing integrations that push form submission data into email campaign tools.
- Building a custom Webhook integrationHow to set up custom webhook integrations that send form data to external URLs automatically.
- Building a custom Predefined OptionManage reusable field options globally and apply them across different forms.
- Building a custom Export TypeInstructions for creating custom data export types for Freeform submission data.