Commit f0bff592 authored by Georg Ringer's avatar Georg Ringer Committed by Andreas Fernandez
Browse files

[BUGFIX] Generate unique id for checkboxes in flexform sections

Use a checksum of the element's name as additional identifier to generate
an unique id for checkboxes in flexform sections.

Resolves: #89092
Releases: master, 9.5
Change-Id: I57075aba05c8de23cbdacfff3a05b63eb71499c9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61911

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarSascha Rademacher <sascha.rademacher+typo3@gmail.com>
Tested-by: default avatarChristian Eßl <indy.essl@gmail.com>
Tested-by: default avatarJörg Bösche <typo3@joergboesche.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarChristian Eßl <indy.essl@gmail.com>
Reviewed-by: default avatarJulian Geils <j_geils@web.de>
Reviewed-by: default avatarSascha Rademacher <sascha.rademacher+typo3@gmail.com>
Reviewed-by: default avatarJörg Bösche <typo3@joergboesche.de>
Reviewed-by: default avatarArmin Vieweg <armin@v.ieweg.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent 203f94e7
......@@ -95,7 +95,7 @@ class FlexFormElementContainer extends AbstractContainer
$fakeParameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'] = str_replace($originalFieldName, $fakeParameterArray['itemFormElName'], $fakeParameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged']);
}
}
$fakeParameterArray['itemFormElID'] = $parameterArray['itemFormElID'] . '_' . preg_replace('/[^a-zA-Z0-9_-]/', '_', $flexFormFieldName);
$fakeParameterArray['itemFormElID'] = $parameterArray['itemFormElID'] . '_' . preg_replace('/[^a-zA-Z0-9_-]/', '_', $flexFormFieldName) . '_' . md5($fakeParameterArray['itemFormElName']);
if (isset($flexFormRowData[$flexFormFieldName]['vDEF'])) {
$fakeParameterArray['itemFormElValue'] = $flexFormRowData[$flexFormFieldName]['vDEF'];
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment