Skip to content

Update example PHP file for InputTextElement #5624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

froemken
Copy link
Contributor

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 froemken requested a review from linawolf May 21, 2025 19:40
@linawolf
Copy link
Member

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?

@froemken
Copy link
Contributor Author

froemken commented May 22, 2025

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

@linawolf
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants