Open
Conversation
* add `RepeatableRow` form element * adjust `FormHooks` to repeat rows instead of container * add new javascript for repeating rows * add build process using webpack * add build to globally expose `RepeatableContainer` class * add bundled build, which already handles initialization * split JS includes into seperate TypoScript files * adjust repeatable container template * remove deprecated style sheet * raise version to `3.0.0` * update README
…ptions to repeatable form container
Collaborator
|
Thanks for your efforts @thommyhh. As far as I understand, your underlying idea is not to copy the “Repeatable Container”, but the “Repeatable Row” inside it. This approach is further nesting in my view. For me, the “Repeatable Container” already corresponds to what I understand from you as “Repeatable Row”. I could currently achieve the same goal by creating a “Fieldset” in the form editor and a “Repeatable Container” in it. The difference for me is the naming. Have I understood your approach correctly or what is the deeper idea here? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)