UserForms module provides a visual form builder for the SilverStripe CMS. No coding required to build forms such as contact pages.
Go to file
Dylan Wagstaff c0a30f1b6a
FIX unrequire fields when they become dataless (#1016)
* FIX unrequire fields when they become dataless

When fields that collect input data are changed in configuration via the
CMS to become fields that no longer collect input data (e.g. TextField
-> HTML Block), submitting the resulting form results in a fatal error,
server 500 response, etc. due to trying to check if a field without data
(ever) has data in it.

To circumvent this we can set the required state to false if the field
is being converted to one that does not collect data (which FormField
API conveniently provides a check for).

* Move parent::onBeforeWrite() to top of function

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
2021-01-17 15:55:47 +13:00
_config Merge branch '5.5' into 5.6 2020-10-22 10:22:19 +13:00
.github/workflows META: Add github action to build docs 2019-12-19 13:47:25 +13:00
.tx NEW Add silverstripe-webpack config and move files to webpack friendly location 2017-08-21 11:12:25 +12:00
client ENH Move jQuery include away from CDN (#1019) 2021-01-17 14:37:01 +13:00
code FIX unrequire fields when they become dataless (#1016) 2021-01-17 15:55:47 +13:00
docs FIX Show custom validation message for checkbox and radio groups 2020-07-21 17:30:55 +12:00
images Add sitetree icon 2015-10-29 12:02:11 +13:00
lang Merge pull request #998 from creative-commoners/pulls/5.6/default-translations 2020-08-19 09:19:31 -07:00
templates FIX Show custom validation message for checkbox and radio groups 2020-07-21 17:30:55 +12:00
tests FIX unrequire fields when they become dataless (#1016) 2021-01-17 15:55:47 +13:00
_config.php Move confirm folder logic to a dedicated controller 2020-06-11 19:53:46 +12:00
.cow.json Add cow config to publish changelogs to GitHub 2017-05-11 15:19:01 +12:00
.editorconfig NEW Add sass-lint configuration and refactor. Refactor JS for AirBnB ES6 syntax 2017-08-22 12:08:08 +12:00
.eslintignore Upgrade dependencies 2019-11-12 07:32:26 +13:00
.eslintrc.js Upgrade dependencies 2019-11-12 07:32:26 +13:00
.gitattributes Added standard git attributes 2015-11-19 19:10:45 +13:00
.gitignore NEW Add silverstripe-webpack config and move files to webpack friendly location 2017-08-21 11:12:25 +12:00
.nvmrc Upgrade dependencies 2019-11-12 07:32:26 +13:00
.sass-lint.yml NEW Add sass-lint configuration and refactor. Refactor JS for AirBnB ES6 syntax 2017-08-22 12:08:08 +12:00
.scrutinizer.yml Update Scrutinizer config to run new build system 2017-11-20 17:50:55 +13:00
.travis.yml Require recipe-cms 4.6 2020-06-18 14:30:24 +12:00
.upgrade.yml API Mark EditableFormField::EffectiveDisplayRules() for deprecation 2020-01-13 12:12:14 +13:00
code-of-conduct.md Added standard code of conduct 2015-11-21 20:11:59 +13:00
codecov.yml Add codecov configuration: do not post comments to GitHub PRs 2017-08-22 16:40:17 +12:00
composer.json Merge branch '5.5' into 5.6 2020-10-22 10:22:19 +13:00
contributing.md Made supported 2015-09-11 11:01:15 +12:00
license.md API Update composer requirements, Travis configuration, add phpcs/phpunit config and remove compass config 2017-08-22 16:40:15 +12:00
package.json NEW Add folder confirmation modal when adding a new EditableFileField to a userform. (#972) 2020-06-10 16:59:01 +12:00
phpcs.xml.dist API Update composer requirements, Travis configuration, add phpcs/phpunit config and remove compass config 2017-08-22 16:40:15 +12:00
phpunit.xml.dist FIX convert CI bootstrap references to new their new locations in vendor 2017-10-05 10:08:31 +13:00
readme.md DOC Recommend installation of spamprotection (#966) 2020-05-27 08:55:37 +12:00
webpack.config.js FIX javascript errors enacting default functionality 2017-11-20 15:16:03 +13:00
yarn.lock Bump elliptic from 6.5.1 to 6.5.3 2020-07-30 12:38:37 +00:00

UserForms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code.

Build Status Scrutinizer Code Quality codecov SilverStripe supported module Version License

Requirements

See the "require" section of composer.json

Features

  • Construct a form using all major form fields (text, email, dropdown, radio, checkbox..)
  • Ability to extend userforms from other modules to provide extra fields.
  • Ability to email multiple people the form submission
  • View submitted submissions and export them to CSV
  • Define custom error messages and validation settings
  • Optionally display and hide fields using javascript based on users input
  • Displays a confirmation message when navigating away from a partially completed form.

Installation

composer require silverstripe/userforms

You'll also need to run dev/build. You should see a new page type in the CMS 'User Defined Form'. This has a new 'Form' tab which has your form builder.

Spam protection

This module does not include spam protection out of the box. Without it, it's likely that your submissions could contain a considerable amount of spam. For public facing forms it is encouraged you review and install the following module plus one of the recommended 'verification system' modules outlined in the README.

Read the SpamProtection Module README for details on how to configure this module.

Documentation

Thanks

I would like to thank everyone who has contributed to the module, bugfixers, testers, clients who use the module and everyone that submits new features.

A big thanks goes out to Jan Düsedau for drawing the custom icon set for the form fields.

Versioning

This library follows Semver. According to Semver, you will be able to upgrade to any minor or patch version of this library without any breaking changes to the public API. Semver also requires that we clearly define the public API for this library.

All methods, with public visibility, are part of the public API. All other methods are not part of the public API. Where possible, we'll try to keep protected methods backwards-compatible in minor/patch versions, but if you're overriding methods then please test your work before upgrading.

Reporting Issues

Please create an issue for any bugs you've found, or features you're missing.