Download the PHP package wwwision/neos-submissions without Composer

On this page you can find all versions of the php package wwwision/neos-submissions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package neos-submissions

Form submissions for Neos

Neos package that stores submissions of Neos.Fusion.Form forms and provides a backend module to browse, search and export them

How it works

Usage

  1. Install the package via composer:

  2. Grant access to the backend module to the corresponding roles via Policy.yaml:

  3. Declare a first preset via Settings.yaml:

  4. Create the database table(s):

[!NOTE] The command is safe to run repeatedly (e.g. as part of every deployment): it only creates missing tables, columns and indexes

  1. Add the StoreSubmission action to your Fusion form:

  2. Navigate to the new backend module

Log in as Neos administrator and navigate to the new "Submissions" module underneath the "Administration" main module, or head straight to /neos/administration/submissions

The StoreSubmission action

The action stores the submitted data and supports the following options:

The action can be combined with any other Fusion.Form action (e.g. Neos.Fusion.Form.Runtime:Email to send a notification, Neos.Fusion.Form.Runtime:Message to render a confirmation, ...).

[!NOTE] The data is stored as JSON, so nested values (e.g. from Neos.Fusion.Form:FieldContainer with a field.name like contact[emailAddress]) are preserved and rendered as nested lists in the backend module and as contact.emailAddress columns in the CSV export

Declaring presets

Presets are declared underneath the Wwwision.Neos.Submissions.presets setting:

Every preset supports the following settings:

A preset can be disabled by setting it to ~ (null).

Submission labels

The submission label is displayed in the list and detail views of the backend module and is exported as label column in the CSV file. By default, it is generated from an Eel expression that has access to the following context variables:

The default expression is ${submissionId}.

Form labels

The form label is displayed in the form filter of the backend module and in the detail view of a submission. By default, it is generated from an Eel expression that has access to the following context variables:

The default expression is ${q(site).find("#" + formId).get(0).label}, i.e. it assumes the formId to be the identifier of a node.

[!NOTE] Labels must never prevent a submission from being stored: if an expression fails or yields an empty result (e.g. because the corresponding node has been deleted), the label falls back to the submission or form id respectively. Labels are generated when a submission is stored, use the regeneratelabels command to update the labels of existing submissions after adjusting the expressions

Custom label generators

For cases that can't be expressed via Eel, custom label generators can be provided by implementing the SubmissionLabelGeneratorFactory and/or FormLabelGeneratorFactory interfaces:

The factory is referenced via the factory setting of the corresponding preset; its options are passed to the create() method:

Backend module

The "Submissions" module underneath the "Administration" main module provides:

[!NOTE] Submissions are never removed from the database by the module. "Deleting" a submission sets its archivedAt timestamp instead – archived submissions are excluded from the module, the CSV export and the CLI commands

The CSV export contains the fixed columns id, formId, presetId, label, createdAt, archivedAt and protected followed by one column per (flattened) form field. Submitted form fields that happen to have the same name as a fixed column are exported with a data. prefix.

[!NOTE] Submitted data is user input. The backend module escapes all values and the CSV export neutralizes cells that spreadsheet applications would otherwise interpret as formulas

CLI commands

Storing submissions programmatically

The FormSubmissionServiceFactory can be injected in order to interact with submissions from PHP, for example to import submissions from another source:

The same service provides handleArchiveSubmission(), handleArchiveUnprotectedSubmissions(), handleProtectSubmission() and handleUnprotectSubmission() to change submissions as well as findSubmissions(), getSubmission() and findForms() to read data (archived submissions are excluded).

Storage

Submissions are stored via Doctrine DBAL in one table per preset, using the default Flow database connection. MySQL/MariaDB, PostgreSQL and SQLite are supported.

Column Description
id UUID of the submission (primary key)
preset_id id of the preset
form_id the formId passed to the action
form_label generated form label
label generated submission label
data submitted data as JSON
protected whether the submission is protected from being deleted
created_at creation timestamp (UTC, DATE_ATOM format)
archived_at archival ("deletion") timestamp, NULL if not archived

A different storage can be provided by implementing the ForStoringSubmissions port and a corresponding ForStoringSubmissionsFactory, and wiring it to the FormSubmissionServiceFactory via Objects.yaml.

Contribution

Contributions in the form of issues or pull requests are highly appreciated.

License

See LICENSE


All versions of neos-submissions with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
doctrine/dbal Version ^3.6
guzzlehttp/psr7 Version ^2.10
neos/fusion-form Version ^3
neos/neos Version ^8.3
psr/clock Version ^1
psr/http-message Version ^1.1 || ^2.0
ramsey/uuid Version ^4
wwwision/neos-modulecomponents Version ^1
webmozart/assert Version ^1.10 || ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wwwision/neos-submissions contains the following files

Loading the files please wait ...