Skip to content
Snippets Groups Projects
Commit 643dfa74 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Remove useless marker fields from the forms finisher

parent ebc08688
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,14 @@ use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
* This finisher sends an email via sg_mail after form submission and enables customization of mail markers
*/
class FormsFinisher extends AbstractFinisher {
/**
* This contains type names of fields we dont care about in sgmail
*
* @var array
*/
const IGNORE_FIELDS = [
'Honeypot', 'Hidden'
];
/**
*
......@@ -68,9 +76,14 @@ class FormsFinisher extends AbstractFinisher {
foreach ($formValues as $identifier => $value) {
$formElement = $formDefinition->getElementByIdentifier($identifier);
if (!$formElement) {
$markers[$identifier] = $value;
continue;
}
$type = $formElement->getType();
if (\in_array($type, self::IGNORE_FIELDS, TRUE)) {
continue;
}
$formElemenProperties = $formElement->getProperties();
if (isset($formElemenProperties['markerName']) && \trim($formElemenProperties['markerName']) !== '') {
$markers[\trim($formElemenProperties['markerName'])] = $value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment