Improved 4.0.22+Demo Templates
Freeform includes a complete set of demo templates. These demo templates let you have a fully functioning area on your website with just a couple clicks! Further to this, it allows you to see real world examples of the template code in action, which will help you get acquainted with Freeform quicker.
Quick troubleshooting the most commonly reported issues with your form's appearance, behavior, or submission of the form on the front end.
Video: Demo Templates Overview
Installing the Demo Templates
To install the Demo Templates, simply visit the Settings page for Freeform and click on the Demo Templates nav item (Freeform > Settings > Demo Templates).
By default, the Demo Templates page will have freeform-demo as the Install Path for your template path. You can change this to whatever you like. So for example, if you set the Install Path value as
freeform-demo, the demo templates will be installed to
During installation of demo templates, Freeform will copy the template folders and files (as shown on page) to the Craft /templates/ directory. So using the above example, your templates would be located at
Freeform will also look for an assets folder in your public directory and attempt to load files such as CSS, JS, fonts and image files (as shown on page) to a folder inside that, named
freeform-demo (using the example above). If an /assets/ directory does not exist, Freeform will attempt to create that directory as well.
And lastly, Freeform will create several template routes for you (as shown on page) for the demo templates to work correctly.
If you ever want to refresh the demo templates back to what they were by default (or if there's been an update to them in a new version), you can simply reinstall the Demo Templates and use the same Install Path value. Freeform will then overwrite the files and only add new routes (if applicable), rather than installing duplicate routes.
If you encounter any issues while attempting to install the demo templates, please see the Troubleshooting guide below.
How do I completely uninstall / remove the demo templates when done?
If you encounter any issues trying to install the demo templates, it's likely that your database user does not have sufficient privileges or your server configuration does not allow some or all of the actions.
If you cannot change or adjust your permissions or configuration, you can install the demo templates manually. To install them manually, refer to the Manual Install instructions below.
To install the demo templates manually, just follow the instructions below:
- Inside the
/vendor/solspace/craft-freeform/packages/plugin/src/codepack/directory, copy the templates folder into the Craft
/templates/directory, and rename the Freeform templates folder to demo (so it should now be located at
- In your root public directory, create a directory called assets if it does not already exist.
- Inside the
/vendor/solspace/craft-freeform/packages/plugin/src/codepack/directory, copy the assets folder into the public
/assets/directory, and rename the Freeform assets folder to demo (so it should now be located at
- Copy and paste the following routes into your routes.php configuration file (
'demo/templates/<*:[^\/]+>' => ['template' => 'demo/templates'], 'demo/templates/<*:[^\/]+>/<*:[^\/]+>' => ['template' => 'demo/templates/form'], 'demo/templates/<*:[^\/]+>/<*:[^\/]+>/edit/<*:[^\/]+>' => ['template' => 'demo/templates/form'], 'demo/submissions/<*:[^\/]+>' => ['template' => 'demo/submissions'], 'demo/submissions/<*:[^\/]+>/spam' => ['template' => 'demo/submissions'], 'demo/submissions/<*:[^\/]+>/<*:[^\/]+>' => ['template' => 'demo/submissions/view'], 'demo/submissions/<*:[^\/]+>/<*:[^\/]+>/spam' => ['template' => 'demo/submissions/view'], 'demo/submissions/delete/<*:[^\/]+>/<*:[^\/]+>' => ['template' => 'demo/submissions/delete'], 'demo/custom' => ['template' => 'demo/custom'], 'demo/custom/<*:[^\/]+>' => ['template' => 'demo/custom/form'], 'demo/extras/suppress-edit-submissions/edit/<token\w+>' => ['template' => 'demo/extras/suppress-edit-submissions'],
Visit your demo templates at: yoursite.com/demo
The demo below is a live demo site that shows most of what the Demo Templates include (some sections and data has been limited).