Download the PHP package dl/honeypotformfield without Composer
On this page you can find all versions of the php package dl/honeypotformfield. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dl/honeypotformfield
More information about dl/honeypotformfield
Files in dl/honeypotformfield
Package honeypotformfield
Short Description Spam protection using a honeypot field for the Neos form builder
License MIT
Informations about the package honeypotformfield
Honeypot Field for Neos.Form and Neos.Form.Builder
This package adds an HoneypotField element, which can be used within your forms. This element is rendered hidden and should never be filled out by a real form user.
A spam detection finisher checks if the form contains such honeypot fields. If any of that fields are filled out, additional field values are introduced which can be used in the following finishers to handle spam.
Installation
composer require dl/honeypotformfield
Usage
Using the flow form configuration
Using the Neos Form Builder
Requires the suggested package neos/form-builder.
- Add honeypot form fields (at least one - as many as you like)
- Add the Spam detection finisher before the finishers, that should use the spam markers.
The finisher adds the following new formFields to the formState:
FieldName | Value | Usage |
---|---|---|
spamDetected | bool true / false when the submitted form is detected as spam | {formState.formValues.spamDetected} |
spamMarker | Contains [SPAM] if detected. Can be used in eMails |
{formState.formValues.spamMarker} |
spamFilledOutHoneypotFields | Contains the filled honeypot fields | {formState.formValues.spamFilledOutHoneypotFields} |
Mark sent mails as spam
These fields can then be used for example to mark mails as spam:
Settings
Cancel mail sending on spam detection
When the cancelSubsequentFinishersOnSpamDetection
setting is set to true
, subsequent finishers are not executed
when the form was detected as spam.
Here the confirmation message is shown but mail sending is cancelled.
Configuration:
Log form content when detected as spam
In order to debug the spam detection and to see what kind of spam is coming in, you can enable the logging of the complete
form content with setting logSpamFormData
to true.