jpmschuler / powermail-limits
TYPO3 EXT:powermail_limits - Addition to EXT:powermail which allows limits for form submissions
Installs: 4 851
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 3
Open Issues: 1
Type:typo3-cms-extension
Requires
- php: ^8.0
- in2code/powermail: ^12.4.0
- typo3/cms-core: ^12.4
- typo3/cms-fluid: ^12.4
- typo3/cms-frontend: ^12.4
Requires (Dev)
- ergebnis/composer-normalize: ^2.19.0
- friendsofphp/php-cs-fixer: ^3.4.0
- helmich/typo3-typoscript-lint: ^3.1.0
- jangregor/phpstan-prophecy: ^1.0.0
- phpstan/extension-installer: ^1.1.0
- phpstan/phpstan: ^1.6.2
- roave/security-advisories: dev-latest
- saschaegerer/phpstan-typo3: ^1.1.2
- seld/jsonlint: ^1.9.0
- squizlabs/php_codesniffer: ^3.6.2
- ssch/typo3-rector: ^2.5.0
- typo3/cms-composer-installers: ^4.0.0-RC1 || ^5.0.0
- typo3/tailor: ^1.5
README
EXT:powermail_limits
This extension allows you to set a submission limit for a TYPO3 EXT:powermail form
Compatibility
v2.x of this Extension is compatible with 12LTS
- TYPO3: ^12
- PHP: ^8.0 (tested with 8.2)
- EXT:powermail ^12.4.0
v1.x of this Extension is compatible with 11LTS
- TYPO3: ^11
- PHP: ^7.4 || ^8.0
- EXT:powermail ^10
Installation
composer req jpmschuler/powermail-limits
What it does
A form gets 3 new fields
has submission limit
: enable and enter a max submission limit in order to enable this extension for a formhas waiting list
: should the form be still available after submissions are full to create a waitlistshow allocation percentage
: should there be an indicator for how many slots are left
After enabling a submission limit the form will get a new first "page" (or fieldset) prepended with an infobox showing there is a limit, if that limit is reached and if a waiting list exists. If however no waiting list was configured and the limit is reached only the infobox is shown and the rest of the form fields and submit won't be rendered. In case the limit was reached an additional mail will be sent to the configured recipient (probably editor responsible for the form) in order to be able to take actions.
Using a DataProcessor a field is added to the answers (thus visible in {powermail_all}
, indicating if it is a valid
submission or a waiting list submission.
In case of a submission after the limit is reached the mail subject gets a prefix and the mail body gets a prefix
(depending on if waiting list or not). If there is an invalid submission (e.g. opened form early, others submitted and
filled limit, than late submit that old form) without an waiting list the mail record is marked hidden.
For forms without a waiting list you can disable or delete mails in the backend to make slots free again. For forms with a waiting list the limit will be counted by all non-disabled mails. Thus, probably you don't want to disable duplicates after the first waiting list registration was done, until the form goes offline. Contacting the applicants to move them from waiting list to valid slot is not done via the extension, but deemed a manual process, done after the form was disabled e.g. based on a CSV export.
Labels and Overrides
All labels are currently locally managed and available in en
and de
. Thus, they can easily be overridden.
The indictator is calculated in 10percent rounded-down steps, so e.g. if there are 87% of slots filled, the label for 80
is shown. This allows a bit of transparency without telling everybody that nobody registered for that 2000 participants
event or without telling everybody you really had only 8 slots.
form.submissionspercentage.0: enough free slots
form.submissionspercentage.10: enough free slots
form.submissionspercentage.20: enough free slots
form.submissionspercentage.30: enough free slots
form.submissionspercentage.40: enough free slots
form.submissionspercentage.50: enough free slots
form.submissionspercentage.60: still slots available
form.submissionspercentage.70: still slots available
form.submissionspercentage.80: still slots available
form.submissionspercentage.90: Warning! Only a few slots available
ToDo
- override backend module mail entry subject (currently the invalid and waitlist prefixes aren't saved)
- override answer page with visual warning prefix
- add backend powermail module deep link to limit reached mail