90027[FEATURE] Simplify registration of custom form elements
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Anja Leichsenring +1
- Sven Liebert +1
-
Verified V +2 Done
- Garvin Hicking +2
- Anja Leichsenring +1
- Sven Liebert +1
- core-ci +1 CI
Issues 1
Files 44
- Build/Sources/Sass/form.scss+7 −6
- Build/Sources/TypeScript/form/backend/form-editor/component/form-element-stage-item.tsnew+337 −0
- Build/Sources/TypeScript/form/backend/form-editor/component/page-stage-item.tsnew+52 −0
- Build/Sources/TypeScript/form/backend/form-editor/stage-component.ts11+227 −67
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-107058-SimplifyRegistrationOfCustomFormElement.rst2new+62 −0
- typo3/sysext/form/Classes/Controller/FormEditorController.php+1 −0
- typo3/sysext/form/Configuration/Yaml/FormElements/AdvancedPassword.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Checkbox.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/ContentElement.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/CountrySelect.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Date.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/DatePicker.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Email.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Fieldset.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/FileUpload.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/GridColumn.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/GridRow.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Hidden.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/ImageUpload.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/MultiCheckbox.yaml+0 −3
Show 24 more files
- typo3/sysext/form/Configuration/Yaml/FormElements/MultiSelect.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Number.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Page.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Password.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/RadioButton.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/SingleSelect.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/StaticText.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/SummaryPage.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Telephone.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Text.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Textarea.yaml+0 −3
- typo3/sysext/form/Configuration/Yaml/FormElements/Url.yaml+0 −3
- typo3/sysext/form/Documentation/I/HowTos/CustomFormElement/Index.rst34new+181 −0
- typo3/sysext/form/Documentation/I/HowTos/CustomFormElement/_CustomFormSetup.yaml8new+82 −0
- typo3/sysext/form/Documentation/I/HowTos/CustomFormElement/_ext_localconf.phpnew+17 −0
- typo3/sysext/form/Documentation/I/HowTos/CustomFormElement/_GenderSelect.fluid.htmlnew+105 −0
- typo3/sysext/form/Documentation/I/HowTos/Index.rstnew+16 −0
- typo3/sysext/form/Documentation/I/Index.rst+1 −0
- typo3/sysext/form/Resources/Private/Language/Database.xlf+84 −0
- typo3/sysext/form/Resources/Private/Language/locallang_form_editor_javascript.xlfnew+26 −0
- typo3/sysext/form/Resources/Public/Css/form.css+6 −5
- typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/component/form-element-stage-item.jsnew+13 −0
- typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/component/page-stage-item.jsnew+13 −0
- typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/stage-component.js+1 −1
Review log 5776
Show 3851 earlier messages
-
Josua Vogel uploaded patch set 1 07/08/25, 14:18
-
core-ci voted on patch set 1 V +1 07/08/25, 14:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81494
-
Garvin Hicking commented on patch set 1 07/08/25, 15:41
-
Sven Liebert commented on patch set 1 07/08/25, 15:45
stage-component.ts:191ReplyAcknowledged -
Garvin Hicking commented on patch set 1 07/08/25, 15:46
how about: Use simple template for custom EXT:form components by default -
Sven Liebert commented on patch set 1 07/08/25, 16:01
stage-component.ts:191Replyunresolved -
Josua Vogel commented on patch set 1 07/08/25, 19:45
stage-component.ts:191ReplyYes, I initially did that, but I don’t see much benefit in it. If we list the elements in addition to the default case, chances are that when someone adds a new element to ext:form, they won’t update this snippet — and the list will become incomplete. -
Garvin Hicking commented on patch set 1 07/08/25, 19:52
stage-component.ts:191ReplyHm, that's not my experience - I would search for existing elements and would be happy to find all places similar to the element I boilerplate. But I understand that its a subjective matter. Resolving here :) -
Garvin Hicking commented on patch set 1 07/08/25, 19:53
(if we label this as a festure, we would need a Feature-rst file entry, too) -
Sven Liebert commented on patch set 1 07/08/25, 20:08
Reply
I'm not sure, but I would label it as task or even as bug, because that behaviour is weired. Some thoughts about that? -
Josua Vogel commented on patch set 1 07/08/25, 20:08
Reply
I can add one tomorrow - or should we label it as TASK? -
Josua Vogel updated the commit message in patch set 2
V +107/08/25, 20:10 -
Josua Vogel commented on patch set 2 07/08/25, 20:10
Reply
Done -
Josua Vogel updated the commit message in patch set 3 07/08/25, 20:14
-
Josua Vogel commented on patch set 3 07/08/25, 20:15
Reply
Relabeled as TASK, because it´s just a small improvement, no real feature (although it makes the developer / integrator life easier). -
core-ci voted on patch set 2 V +1 07/08/25, 20:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81498
-
core-ci voted on patch set 3 V +1 07/08/25, 20:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81499
-
Sven Liebert voted on patch set 3 CR +1 V +1 07/08/25, 20:57
-
Benjamin Franzke commented on patch set 3 CR -1 07/11/25, 06:55
stage-component.ts:190The `default` case must not perform any rendering, since it's documented that custom types shall trigger the desired rendering in the event (publishsubscriber that is triggered after this switch block) in their own. See https://docs.typo3.org/permalink/typo3-cms-form:apireference-formeditor-basicjavascriptconcepts-events-view-stage-abstract-render-template-perform Especially: https://docs.typo3.org/c/typo3/cms-form/13.4/en-us/D/FormEditor/Index.html#view-stage-abstract-render-template-perform:~:text=getFormEditorApp().getViewModel().getStage().renderSelectTemplates(args%5B0%5D%2C%20args%5B1%5D)%3B That means all core types that should render via `renderSimpleTemplateWithValidators` need to be listed explicitly as already desired by Garvin https://review.typo3.org/c/Packages/TYPO3.CMS/+/90027/comment/beb33d38_80cf0cf6/ -
Josua Vogel commented on patch set 3 07/11/25, 07:41
stage-component.ts:190ReplyThank you for your feedback! I would like to simplify the process. I know some developers (myself included) who find it complicated to add a new form element. The documentation is complex, a newbie can't find this place. If you need a custom stage component, the event is great. In most cases, however, the SimpleTemplate is sufficient. Do you have an alternative idea to simplify it for developers? -
Benjamin Franzke commented on patch set 3 07/15/25, 08:25
stage-component.ts:190ReplyI'm sorry, but I have no idea :( I understand the desire for simplification, but the problem basically is the status quo: We have no signal, whether a custom component was/will be rendered in the `'view/stage/abstract/render/template/perform'` event, therefore this change does not just add a "default", but the rendering is *always* triggered, and there is no way for developers to opt-out from this "default"-rendering. The "best" idea I could come up with would be to replace the `formEditorPartials` concept by a new one, where php-based-backend templating and js-based-hydration are streamlined to be always in sync, instead of relying on descriptive form configuration and imperative JS to properly work together. That could ideally be pure js-based rendering and no fluid templates, but I would not touch existing `formEditorPartials` and `'view/stage/abstract/render/template/perform'` rendering flow, but consider that as a legacy part that is rather to be replaced in the long term, without breaking it short term. -
Josua Vogel commented on patch set 3 07/15/25, 09:52
stage-component.ts:190ReplyDiscussed: Check whether you can implement a new way, similar to the (site) settings types. These also only receive data (the settings definition) and the current value. -
Josua Vogel uploaded patch set 4
CR +1V +101/20/26, 16:11 -
core-ci voted on patch set 4 V +1 01/20/26, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93876
-
Josua Vogel commented on patch set 4 01/20/26, 16:24
stage-component.ts:190Reply@ben@bnf.dev I'm currently working on this topic again because I want to simplify the creation of new FormElement types (probably hardly anyone finds the JS part great or intuitive). As you can see in the WIP, a web component is being introduced to replace the Stage template. The templates are all structured quite similarly, so in my opinion, they can be easily mapped in a component. The web component is always rendered if there is no “formEditorPartials: FormElement-DatePicker: Stage/SimpleTemplate” (or similar) part in the YAML configuration. Less configuration for everyone. If someone wants to render their own template, the YAML part is ignored as before and the event is fired. What do you think? -
Josua Vogel uploaded patch set 5
V +101/23/26, 11:11 -
core-ci voted on patch set 5 V -1 01/23/26, 11:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94155
-
Josua Vogel uploaded patch set 6
V -101/23/26, 11:58 -
Josua Vogel uploaded patch set 7 01/23/26, 12:05
-
Josua Vogel commented on patch set 7 01/23/26, 12:07
stage-component.ts:190ReplyDone -
core-ci voted on patch set 6 V -1 01/23/26, 12:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94163
-
core-ci voted on patch set 7 V +1 01/23/26, 12:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94164
-
Josua Vogel marked it work in progress 01/23/26, 12:17
-
Josua Vogel uploaded patch set 8
V +101/26/26, 09:50 -
core-ci voted on patch set 8 V +1 01/26/26, 09:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94351
-
Josua Vogel uploaded patch set 9
V +101/26/26, 10:41 -
Josua Vogel marked it ready for review 01/26/26, 10:48
-
core-ci voted on patch set 9 V +1 01/26/26, 10:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94352
-
Sven Liebert voted on patch set 9 CR +1 V +1 01/28/26, 12:06
-
Georg Ringer voted on patch set 9 CR +1 V +1 01/29/26, 18:38
-
Georg Ringer commented on patch set 9 CR -1 02/06/26, 18:53
please provide a **working** example in the docs (linked in the rst), how it is done. as extending form is always not a pleasure! it would be also interesting if it is "just" for own elements or also custom finishers -
Josua Vogel uploaded patch set 10
CR +1V +102/06/26, 20:11 -
Josua Vogel uploaded patch set 11 02/06/26, 20:12
-
core-ci voted on patch set 10 V -1 02/06/26, 20:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95342
-
Josua Vogel uploaded patch set 12 02/06/26, 20:25
-
core-ci voted on patch set 11 V -1 02/06/26, 20:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95343
-
core-ci voted on patch set 12 V +1 02/06/26, 20:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95344
-
Josua Vogel commented on patch set 12 02/06/26, 20:36
Reply
It´s only for own form elements, I added a "How To". The only fundamental change is that you don't need JavaScript if you provide your own element. -
Josua Vogel uploaded patch set 13
V +102/06/26, 20:39 -
core-ci voted on patch set 13 V +1 02/06/26, 20:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95345
-
Garvin Hicking commented on patch set 12 02/06/26, 20:57
I LOVE that you took the initiative to add a howto. I firmly believe we need this. I need this 🙃 I have a few "damn you docs guy!" comments and hope you can bear with me. We can also do a followup, but everything we fixate now helps for this patch to be reviewable. Thanks!Index.rst:5Please line up the equal signs to the textIndex.rst:6Please use sentence case (no uppercasing), in all headlines hereIndex.rst:22please use "sitepackage" as the established termIndex.rst:28```suggestion defines how the element behaves in both form editor and frontend. ```Index.rst:33```suggestion Create the following file in your extension (also create the directories if they do not yet exist): ```Index.rst:35```suggestion :file:`EXT:my_extension/Configuration/Form/CustomFormSetup.yaml` ``` Please use "my_extension" which we try to use commonly in the docsIndex.rst:49When I read "editors" I often think of "people who do editing" or "IDE". Could you maybe explain this term or link to the form docs where it is established? Do we have a terminology section, I only found "concepts" but these are huge pages and they did not seem to explain what "editors" are (other than the sectoons "For Editors", and you don't mean that)Index.rst:92```suggestion After adding the configuration, you must clear all TYPO3 caches. ``` (Just to be sure that there is no form/specific cache)Index.rst:98With the earlier section I would think there are multiple editors like "Form editor", thats where confusion could happen. So here it helps that you exactly describe whst you refer to.Index.rst:99```suggestion 1. Open the Form Editor (:guilabel:`Forms > [Your Form] > Edit`) ```Index.rst:104"Via the top bar button" or so?Index.rst:120Use .fluid.html extensionIndex.rst:133you can use ":emphasize-lines:" to highlight the key lines hereIndex.rst:149```suggestion If you want to make the options editable in the form editor (instead of using hard-codes values within your YAML), add this editor ```Index.rst:153Please mention filename to be sureIndex.rst:167Emphassize these linesIndex.rst:172Maybe explain "grid editor", terminology?_CustomFormSetup.yaml:14Thanks for being inclusive here, that means a lot. Maybe also add "does not matter" or so for extra care :)_CustomFormSetup.yaml:21Could you add a bit of inline comments here, maybe also say why the options are container twice in here and not just once_CustomFormSetup.yaml:27(I really think having this element called "editors" is a major source of confusion for me, Kuch more than "fieldExplanationText" 🤓)_CustomFormSetup.yaml:34Maybe explain why is it label.label 🤪_GenderSelect.html:3Could you maybe add <f:comment> lines here that roughly(!) explain the sections? Also maybe more spacing for sections so that it looks less intimidating?locallang_formEditor_javascript.xlf:2ease use snake case for filenames "form_editor_javascript"
-
Josua Vogel commented on patch set 14
V +102/06/26, 21:10Published edit on patch set 13. -
Josua Vogel commented on patch set 14 02/06/26, 21:12
Index.rst:28ReplyFix applied.Index.rst:33ReplyFix applied.Index.rst:35ReplyFix applied.Index.rst:92ReplyFix applied.Index.rst:99ReplyFix applied. -
core-ci voted on patch set 14 V +1 02/06/26, 21:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95347
-
Josua Vogel uploaded patch set 15
V +102/10/26, 14:25 -
Josua Vogel commented on patch set 15 02/10/26, 14:25
Index.rst:5ReplyDoneIndex.rst:6ReplyDoneIndex.rst:22ReplyDoneIndex.rst:49ReplyDoneIndex.rst:98ReplyDoneIndex.rst:104ReplyDoneIndex.rst:120ReplyDoneIndex.rst:133ReplyDoneIndex.rst:149ReplyDoneIndex.rst:153ReplyDoneIndex.rst:167ReplyDoneIndex.rst:172ReplyDone_CustomFormSetup.yaml:14ReplyDone_CustomFormSetup.yaml:21ReplyDone_CustomFormSetup.yaml:27ReplyAcknowledged_CustomFormSetup.yaml:34ReplyDone_GenderSelect.html:3ReplyDonelocallang_formEditor_javascript.xlf:2ReplyDone -
core-ci voted on patch set 15 V +1 02/10/26, 14:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95555
-
Josua Vogel commented on patch set 16
V +102/11/26, 15:49Published edit on patch set 15. -
core-ci voted on patch set 16 V +1 02/11/26, 15:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95635
-
Sven Liebert voted on patch set 16 CR +1 V +1 02/11/26, 16:54
-
Anja Leichsenring commented on patch set 16 CR +1 V +1 02/11/26, 19:26
very nice improvement, thank you Josua. -
Garvin Hicking commented on patch set 16 02/12/26, 11:44
Feature-107058-SimplifyRegistrationOfCustomFormElement.rst:60```suggestion :ref:`Creating a Custom Form Element <typo3/cms-form:howtos-custom-form-element>`. ``` -
Garvin Hicking commented on patch set 16 V -1 02/12/26, 11:52
Now that "fieldExplanationText" change has been merged, the docs and example core are wrong for this and need adaptation. In the inspector I only see an empty label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.numbersOfColumnsToUse.fieldExplanationText but not any contents. Is that a breaking change related to that merged patch for other custom integrations then that needs inspection (and a separate fixup, or here?) I uploaded a screenshot into the issue. -
Josua Vogel uploaded patch set 17
CR +1V +102/12/26, 13:12 -
Josua Vogel commented on patch set 17 02/12/26, 13:12
Feature-107058-SimplifyRegistrationOfCustomFormElement.rst:60ReplyFix applied. -
Josua Vogel commented on patch set 18 02/12/26, 13:12
Published edit on patch set 17. -
core-ci voted on patch set 17 V +1 02/12/26, 13:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95726
-
core-ci voted on patch set 18 V -1 02/12/26, 13:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95727
-
Josua Vogel uploaded patch set 19
V -102/12/26, 13:37 -
Josua Vogel commented on patch set 19 02/12/26, 13:38
Reply
changed the how-to / example -
core-ci voted on patch set 19 V +1 02/12/26, 14:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95731
-
Anja Leichsenring voted on patch set 19 CR +1 V +1 02/12/26, 19:20
-
Josua Vogel commented on patch set 19 02/12/26, 21:00
Reply
Short notice: As discussed with Garvin, I added the removed labels as a drive-by and marked them as unused (so there won't be any problems due to possible breaking changes). -
Sven Liebert voted on patch set 19 CR +1 V +1 02/12/26, 21:43
-
Garvin Hicking voted on patch set 19 CR +2 V +2 02/16/26, 10:44
-
Garvin Hicking merged patch set 20 02/16/26, 10:45
stage-component.ts:191