Feature #34198
Skip unknown FormElements
Status: | Resolved | Start date: | 2012-02-23 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | - | |||
Target version: | - |
Description
Currently, if a FormElement that is not specified in the current FormDefinition (e.g. current preset) an Exception is thrown.
It should be possible to skip such elements.
In the FormBuilder (rootForm.renderingOptions.previewMode == TRUE) unknown elements should be replaced by some "MissingFormElement" that renders some error message.
When rendering the Form it should be possible to simply skip those elements.
Possibly this could be achieved with some setting skipUnknownFormElements
Associated revisions
[FEATURE] Skip unknown FormElements
With this change FormElements without definition in the current
preset can be skipped while rendering.
In ``previewMode`` (e.g. inside the FormBuilder) instead of an
exception an error message is now rendered in the form::
<div class="typo3-form-unknown-element" data-element="element/path">
<em>Unknown Form Element "<type>"</em>
</div>
During rendering of the Form unknown Form Elements still throw
an exception by default for backwards compatibility reasons.
But this behavior can be changed for single presets with the
new rendering option ``skipUnknownElements``::
TYPO3:
Form:
presets:
'somePresetName':
formElementTypes:
'TYPO3.Form:Base':
renderingOptions:
skipUnknownElements: TRUE
With this option set, unknown Form Elements won't be rendered
at all.
Change-Id: I1746d636d013c8a345f8dc668037c64c656894ed
Resolves: #34198
History
#1 Updated by Gerrit Code Review almost 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24929
#2 Updated by Gerrit Code Review almost 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24929
#3 Updated by Gerrit Code Review almost 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24929
#4 Updated by Bastian Waidelich almost 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 16cf7e6cae8d140e57b7973ab75af14c64479255.