Note
This is a fork of tritum/repeatable_form_elements, the original extension by Ralf Zimmermann / dreistrom.land. This fork adds TYPO3 v14 compatibility, PSR-14 event migration, CI/CD infrastructure and a DDEV-based multi-version test environment.
A TYPO3 extension that adds a Repeatable container element to the TYPO3 form framework. It allows editors to create container elements with any type of fields. In the frontend, users can dynamically add and remove copies of the container. Validation is copied automatically and all form finishers are aware of the duplicated fields.
- Repeatable container: a form element editors add to the form editor like any other, holding any combination of field types
- Dynamic frontend duplication: frontend users add and remove copies of the container via JavaScript, no page reload
- Validation-aware: validators on the original fields are copied automatically to every duplicated field
- Finisher-aware: all form finishers, including an extended
SaveToDatabaseFinisher, understand and persist the duplicated fields - Extensible: PSR-14 events let you modify or disable copied variants and react after a container is built
- TYPO3 v13 and v14 compatible: SC_OPTIONS hooks on v13, PSR-14 event listeners on v14
- TYPO3 13.4 LTS or 14.3 LTS
- PHP 8.2 β 8.5
composer require move-elevator/typo3-repeatable-form-elementsAdd the site set tritum/repeatable-form-elements to the dependencies of your site package's site set:
# Configuration/Sets/YourSitePackage/config.yaml
dependencies:
- tritum/repeatable-form-elements- Open the TYPO3 form editor and create or open a form.
- Add a new element β the modal lists the Repeatable container.
- Add fields with validators to the container.
- In the frontend, the container renders as a
<fieldset>with copy and remove buttons.
An extended version of the SaveToDatabaseFinisher is included for persisting repeatable container data. See the example form definition.
To deactivate the copying of variants, disable the feature flag:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['features']['repeatableFormElements.copyVariants'] = false;| Event | Description |
|---|---|
CopyVariantEvent |
Modify or disable specific copied variants during container duplication. |
AfterBuildingFinishedEvent |
React after a form renderable has been built/copied by the repeatable container logic. Replaces the removed afterBuildingFinished SC_OPTIONS hook. |
Please have a look at CONTRIBUTING.md.
Originally created by Ralf Zimmermann / dreistrom.land. See the original repository for the full list of contributors.
This fork is maintained by move:elevator.
GPL-2.0-or-later β see LICENSE for details.