firesphere / partialuserforms
Store partial userform submissions
Installs: 580
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 4
Forks: 8
Open Issues: 33
Type:silverstripe-vendormodule
Requires
Requires (Dev)
- dev-master / 1.x-dev
- 0.20
- 0.11
- 0.10.1
- 0.10
- 0.9
- 0.5
- 0.2.0
- 0.1.1
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-dependabot/npm_and_yarn/tar-4.4.19
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.7
- dev-dependabot/npm_and_yarn/http-proxy-1.18.1
- dev-dependabot/npm_and_yarn/acorn-6.4.1
- dev-dependabot/composer/symfony/cache-3.4.36
- dev-feature/link-file-submission
- dev-feature/prevent-session-override
This package is auto-updated.
Last update: 2024-11-04 05:30:48 UTC
README
Partial User Defined Form submissions
This module aims to store partial submissions of userforms, for where the User Defined Form has multiple "pages".
The partials are stored and removed when the form is finished.
Installation
composer require firesphere/partialuserforms
Usage
Partial form submissions are stored in the database and visible on the forms in the CMS.
A daily export of the partial submissions can be acquired by checking the checkbox on the form and setting the configuration in the Settings
Requirements
- UserDefinedForms 5+
- SilverStripe Recipe CMS 1+
- QueuedJobs 4+
Dev requirements
- PHPUnit
- Immediate exception printer
- PHP CodeSniffer
Usage with Elemental UserForms
Add the following to your config yml:
DNADesign\ElementalUserForms\Model\ElementForm: extensions: - Firesphere\PartialUserforms\Extensions\UserDefinedFormExtension
Extensions
To manage the CSV's that are send out, e.g. to filter certain values or remove records from the CSV,
the export job has an extension point calld updateCSVRecords
, in which you can filter records, e.g.
class PartialSubmissionJobExtension extends Extension { /** * Remove records that do not have an email address * to reduce the amount of useless records * @param $csvArray * @param $editableFields */ public function updateCSVRecords(&$csvArray, $editableFields) { $emailAddress = array_search('email_address', array_keys($editableFields)); foreach ($csvArray as $key => $value) { if (empty($value[$emailAddress])) { unset($csvArray[$key]); } } } }
Benefits
With Partial forms, partial submissions are available to CMS users, to see how far a visitor got through the form and optionally make a call to the user, asking why they gave up.
Further improvements
- Save the partial form to LocalStorage, to enable pre-filling of forms
- Retrieve the partial form from the server to enable pre-filling of the forms
- JS test coverage
Actual license
This module is published under BSD 3-clause license, although these are not in the actual classes, the license does apply:
http://www.opensource.org/licenses/BSD-3-Clause
Copyright (c) 2012-NOW(), Simon "Firesphere" Erkelens
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Did you read this entire readme? You rock!
Pictured below is a cow, just for you.
/( ,,,,, )\
_\,;;;;;;;,/_
.-"; ;;;;;;;;; ;"-.
'.__/`_ / \ _`\__.'
| (')| |(') |
| .--' '--. |
|/ o o \|
| |
/ \ _..=.._ / \
/:. '._____.' \
;::' / \ .;
| _|_ _|_ ::|
.-| '==o==' '|-.
/ | . / \ | \
| | ::| | | .|
| ( ') (. )::|
|: | |; U U ;|:: | `|
|' | | \ U U / |' | |
##V| |_/`"""`\_| |V##
##V## ##V##