Issue Bug Closed

#107025EXT:form EmailToSender Problem with variables in flexform override

Samuel Heinz 07/03/25, 08:37 updated 12/02/25, 14:39

Description

In the TYPO3 v13 LTS is currently the problem with dynamic receiver (variable) in the EmailToSender finisher, when flexform override is active (Checkbox in Plugin). The input field is type=“email” which works great for a static email address. But if you use the variable of the form input field “E-Mail” the HTML5 validation don’t accept the variable value because of missing “@” (screenshot) and you are not able to safe the plugin.

To use variables for the EmailToSender override, the input field must be type=“text”.

Thanks :)

Reviews 3

Files 1

History 1024

  1. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-07-03T11:04:33+00:00" > 07/03/25, 11:04 </span>

    Just some note: This is due to typo3/sysext/form/Configuration/Yaml/Finishers/EmailToReceiver.yaml declaring:

    prototypes:
      standard:
        finishersDefinition:
          EmailToReceiver:
            FormEngine:
              elements:
                recipients:
                  el:
                    _arrayContainer:
                      el:
                        email:
                          label: tt_content.finishersDefinition.EmailToSender.recipients.email.label
                          config:
                            type: email

    with https://review.typo3.org/c/Packages/TYPO3.CMS/+/74229 (12.0).

  2. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-07-03T12:00:49+00:00" > 07/03/25, 12:00 </span>

    I’ve tried this with v11, v12 and v13 and all have this type=email HTML display, so at least this is not a regression.

    Actually, I would argue, this is even intentional: The flexform override is something that should be used to only override a base configuration with specific values. You should better provide placeholders inside the actual YAML configuration, and actually do NOT use a flexform override for it.

    Could you describe your use case maybe, if this is not an option for you? Changing this to type=text would have negative impact on normal editors to enter emails, because then they would be able to enter any kind of text here.

  3. Samuel Heinz commented <span data-processor="relativetime" data-value="2025-07-07T09:01:46+00:00" > 07/07/25, 09:01 </span>

    Garvin Hicking wrote in #note-3:
    > I’ve tried this with v11, v12 and v13 and all have this type=email HTML display, so at least this is not a regression.
    >
    > Actually, I would argue, this is even intentional: The flexform override is something that should be used to only override a base configuration with specific values. You should better provide placeholders inside the actual YAML configuration, and actually do NOT use a flexform override for it.
    >
    > Could you describe your use case maybe, if this is not an option for you? Changing this to type=text would have negative impact on normal editors to enter emails, because then they would be able to enter any kind of text here.

    Hi Garvin,
    thx for your reply.

    The variable {email-1} is set directly in the contactform.form.yaml. In this case we use one global form configuration for multiple forms and just override the EmailToReceiver with the plugin checkbox “Finisher-Einstellungen überschreiben” (in German). So the variable “{email-1}” of the yaml configuration is also copied to the field “email” of EmailToSender tab. Because of the validation to email address you can’t safe the plugin anymore. Without a EmailToSender Finisher and the variable this was absolutly no problem. I think the EmailToSender Finisher only make sense with a variable and not with a specific static email address or is there another best practice for configuration settings?

    Best regards

  4. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-07-07T09:33:50+00:00" > 07/07/25, 09:33 </span>

    Ooooh. Now I see. Thanks for explaining this.

    I’ll have to ask around, I must admit I rarely use the overrides myself. :-/

  5. André Buchmann commented <span data-processor="relativetime" data-value="2025-07-21T13:29:29+00:00" > 07/21/25, 13:29 </span>

    Got the same problem. In TYPO3 12.4.31+ (maybe even earlier) the {my-field}-values of finisher overriedes are removed and the fields are empty after safing.
    The project launched with 11.5 and there it was possible to use the field identifiers in the email finisher overrides.

    Thanks for the hint @ghi

    My current workaround:

    TYPO3:
      CMS:
        Form:
          prototypes:
            standard:
              finishersDefinition:
                EmailToSender:
                  FormEngine:
                    elements:
                      recipients:
                        el:
                          _arrayContainer:
                            el:
                              email:
                                config:
                                  type: input
                      replyToRecipients:
                        el:
                          _arrayContainer:
                            el:
                              email:
                                config:
                                  type: input
                      carbonCopyRecipients:
                        el:
                          _arrayContainer:
                            el:
                              email:
                                config:
                                  type: input
                      blindCarbonCopyRecipients:
                        el:
                          _arrayContainer:
                            el:
                              email:
                                config:
                                  type: input
                EmailToReceiver:
                  FormEngine:
                    elements:
                      recipients:
                        el:
                          _arrayContainer:
                            el:
                              email:
                                config:
                                  type: input
                      replyToRecipients:
                        el:
                          _arrayContainer:
                            el:
                              email:
                                config:
                                  type: input
                      carbonCopyRecipients:
                        el:
                          _arrayContainer:
                            el:
                              email:
                                config:
                                  type: input
                      blindCarbonCopyRecipients:
                        el:
                          _arrayContainer:
                            el:
                              email:
                                config:
                                  type: input
  6. Gerrit Code Review pushed patch set 1 for main to change 90144 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2025-07-24T14:21:03+00:00" > 07/24/25, 14:21 </span>

  7. Josua Vogel commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-09-19T12:05:08+00:00" > 09/19/25, 12:05 </span>

    Applied in changeset commit:31c69224d7d38892c3425f5e02253e38d341bfcd.