TYPO3CMS-Reference-CoreApi icon indicating copy to clipboard operation
TYPO3CMS-Reference-CoreApi copied to clipboard

Update example PHP file for InputTextElement

Open froemken opened this issue 6 months ago • 3 comments

The InputTextElement got new default FieldInformation for tcaDescription. It was added with TYPO3 9 and I think we should update our example accordingly. I have tried to keep the example as short as possible (as before).

froemken avatar May 21 '25 19:05 froemken

Implementing these in your custom input makes the example quite complex and you would usually not use them anyway? So what is the advantage of making the example more complex?

linawolf avatar May 22 '25 13:05 linawolf

It is not an example. Yes, I also have written "example", sorry, but this code is a "short" visualization how the InputTextElement of TYPO3 works with fieldInformation, fieldWizard and fieldControl. Why adding defaultFieldWizard? Why calling it also InputTextElement? The describing text is

Example. The InputTextElement (standard input element) defines a couple of default wizards and embeds them in its main result HTML:

https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/FormEngine/Rendering/Index.html#FormEngine-Rendering-NodeExpansion

We are in a section where the rendering of all these wizards is working. And in that case we should explain how these are added.

Adding a new wizard is part of: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/FormEngine/Rendering/Index.html#add-fieldcontrol-example

And yes, the namespace should also be the TYPO3 namespace. If I get your GO, I will update my patch again.

Stefan

froemken avatar May 22 '25 20:05 froemken

Yeas please update the snippet and maybe leave a commen on that it is a visualization of core code, not a coding example?

linawolf avatar May 23 '25 05:05 linawolf