punktde/form-persistence
composer require punktde/form-persistence
Provides a form finisher to save the form data to the database and a backend module to download the data.
1.0.0
Provides a form finisher to save the form data to the database and a backend module to download the data.
- Requires
- neos/neos: ^4.0 || ^5.0
- neos/form: *
- neos/fusion: *
- league/csv: ^9.0
- Requires (dev)
- None
- Suggest
- neos/form-builder: Adds a builder for the Flow Form Framework to the Neos CMS backend.
- Provides
- None
- Conflicts
- None
- Replaces
- None
PunktDe.Form.Persistence
Form Persistence Finisher with a backend module to download the form-data.
This package adds a persistence finisher to persist form data into your database. The saved form data can be downloaded as a csv file in the backend at any given time.
Form data is aggregated by the combination of the form identifier and a hash of the form field identifiers.
Installation
composer require punktde/form-persitence
After the successful installation run ./flow doctrine:migrate
to initialize the database table.
Usage
Add the SaveFormDataFinisher
Using the flow form configuration
type: 'Neos.Form:Form'
identifier: 'my-form'
renderables:
...
finishers:
saveFormData:
identifier: 'PunktDe.Form.Persistence:SaveFormDataFinisher'
Using the Neos Form Builder
Require the suggested package neos/form-builder and add the save form data finisher to your node based form in the neos backend.
Download the data using the backend module
A simple backend module is provided to download the form data as CSV. The form version specifies the used fields and their position. With that it is taken care, that if the form changes over time, a separate CSV file with consistent headers and column position is generated.