Bug #98210
openmultiValueProperties not settable by hook buildFormDefinitionValidationConfiguration
0%
Description
Hi.
I created a new single select form element with a custom multi select form editor to select the options. While saving the form TYPO3 complains about the missing HMAC. After some fiddling and searching around, I came across \TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\MultiValuePropertiesExtractor which seems to do the stuff I needed, but unfortunatly only for a fixed subset of inspector editors is allowed. If I add my custom editor here too (Seems that I need to add only $result['formElements'][$formElementType]['multiValueProperties'][] = 'options'; for my Inspector-CustomMultiSelectEditor), everything works as expected.
Later on I discovered the hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['buildFormDefinitionValidationConfiguration'] and regarding the documenation (https://docs.typo3.org/c/typo3/cms-core/9.5/en-us/Changelog/8.7.x/Important-85044-FilterDisallowedPropertiesInFormEditor.html) this should be the way to go to set the properties to allow saving mit custom editor data. But I am not able to pass "properties.options" and "options" to the "multiValueProperties" element.
Looks like there is something missing in the form-extension to handle this?
How do I set "multiValueProperties"?
Updated by Netresearch DTT GmbH over 2 years ago
Seems to be enought if I add my Inspector-CustomMultiSelectEditor to the conditions in \TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\MultiValuePropertiesExtractor::__invoke and \TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\MultiValuePropertiesExtractor::__invoke
if ( $value !== 'Inspector-PropertyGridEditor' && $value !== 'Inspector-MultiSelectEditor' && $value !== 'Inspector-ValidationErrorMessageEditor' && $value !== 'Inspector-RequiredValidatorEditor' && $value !== 'Inspector-CustomMultiSelectEditor' ) { return; }