[FEATURE] Add repeatable rows #17
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The extension was a great starting point, I found the behaviour of duplicating the whole container quite strange. So I decided to improve it - from my point of view - by introducing an extra level, the
RepeatableRow. With this change, the elements configured are wrapped inside aRepeatableRowfirst. The row is then duplicated.This changed behaviour was inspired the the Symfony Forms Collection type, which indeed is a very useful extension to the TYPO3 form framework.
I've also adjusted - or more completely rewritten - the javascript code. It does not depend on jQuery or any other framework anymore and comes with two variants:
I updated the README, so please take a look at https://github.com/webcoast-dk/repeatable_form_elements/tree/feature/add-repeatable-rows
Because of those drastic changes, I see this as a
v3.0.0.I hope this contribution is appreciated. I'm open for questions and discussion, either here or in the TYPO3 slack (
@Thorben Nissen)