Issue Task Closed

#69037EXT:form - Missing label leads to unrendered mandatory and error messages

Björn Jacob 08/13/15, 23:37 updated 09/30/15, 15:21

Description

Imagine the following snippet:

10 = TEXTLINE
10 {
  name = name
}

Since no label is defined the whole label tag is not rendered. Due to this the mandatory and error messages are not rendered as well. It should be possible to work with empty labels since placeholders are working and could carry the “field description”. As a solution one could think to do the following:

10 = FORM
10 {
  layout {
    label = <label><labelvalue /></label><mandatory /><error />
  }
}

Right now this is not possible. The following PHP errors occur:

Core: Error handler (FE): PHP Catchable Fatal Error: Argument 3 passed to
TYPO3\CMS\Form\View\Form\Element\AbstractElementView::replaceNodeWithFragment()
must be an instance of DOMNode, null given, called in
sysext/form/Classes/View/Form/Element/AbstractElementView.php on line 139 and
defined in sysext/form/Classes/View/Form/Element/AbstractElementView.php line 275    

Core: Error handler (FE): PHP Warning: DOMDocument::loadXML():
Extra content at the end of the document in Entity, line: 1 in
/sysext/form/Classes/View/Form/Element/AbstractElementView.php line 223

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.