Skip to content

Commit

Permalink
[BUGFIX] Show fieldname of flexform fields
Browse files Browse the repository at this point in the history
Since #83461 the name of the field is rendered next to the label for
administrator users if debug mode is enabled. Now also the name of
flexform fields is rendered.

Resolves: #92283
Releases: master, 10.4
Change-Id: I90f7452808f08f5cbf77713f3416a4a1c02b1e6c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65831
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
georgringer authored and bmack committed Sep 23, 2020
1 parent 8b4803a commit a40d342
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -44,6 +44,8 @@ public function render()

$languageService = $this->getLanguageService();
$resultArray = $this->initializeResultArray();
$showFieldName = $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] && $this->getBackendUserAuthentication()->isAdmin();

foreach ($flexFormDataStructureArray as $flexFormFieldName => $flexFormFieldArray) {
if (
// No item array found at all
Expand Down Expand Up @@ -147,6 +149,7 @@ public function render()
$html[] = '<div class="form-group t3js-formengine-palette-field t3js-formengine-validation-marker">';
$html[] = '<label class="t3js-formengine-label">';
$html[] = BackendUtility::wrapInHelp($parameterArray['_cshKey'], $flexFormFieldName, $processedTitle);
$html[] = $showFieldName ? ('<code>[' . htmlspecialchars($flexFormFieldName) . ']</code>') : '';
$html[] = '</label>';
$html[] = '<div class="formengine-field-item t3js-formengine-field-item">';
$html[] = $childResult['html'];
Expand Down

0 comments on commit a40d342

Please sign in to comment.