File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Documentation/Global/Form Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,35 @@ where (optional and configurable) validation occurs.
113113Only valid data is passed on to the action and stored in
114114the database.
115115
116+ .. _typo3-fluid-form-components :
117+
118+ Using f:form.<somefield> in Fluid components
119+ ============================================
120+
121+ .. warning ::
122+
123+ Form input fields like the `Form.textfield ViewHelper <f:form.textfield> <https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-form-textfield >`_
124+ need to find their parent form `<f:form> ` within the rendering context.
125+
126+ They cannot be used in Fluid Components in TYPO3 13.4.
127+
128+ In `Components <https://docs.typo3.org/permalink/fluid:components >`_
129+ (introduced with Fluid 4.3) a new rendering context is created for
130+ each Fluid component. Therefore form fields loose the connection
131+ to their parent form and cannot be used.
132+
133+ It is however possible to pass a form field to a slot:
134+
135+ .. literalinclude :: _codesnippets/FormFieldComponent.html
136+
137+ And then use it like this:
138+
139+ .. code-block :: html
140+
141+ <my:inputWithLabel id =" abc" label =" My label" >
142+ <f:input id =" abc" property =" myProperty"
143+ <my:inputWithLabel >
144+
116145.. _typo3-fluid-form-arguments :
117146
118147Arguments of the form ViewHelper
Original file line number Diff line number Diff line change 1+ < f:argument name ="id " type ="string " />
2+ < f:argument name ="label " type ="string " />
3+
4+ < div class ="mb-3 ">
5+ < label for ="{id} " class ="form-label "> {label}</ label >
6+ < f:slot />
7+ </ div >
You can’t perform that action at this time.
0 commit comments