Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Allow Eel-Helper in AbstractFinisher for parseOption() #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erkenes
Copy link
Contributor

@erkenes erkenes commented Sep 15, 2022

Allows the usage of a Eel-Helper in the parseOption-Function This is useful if you have a form and want to send an email to different recipient-addresses based on the configuration context

Allows the usage of a Eel-Helper in the parseOption-Function
This is useful if you have a form and want to send an email to different
recipient-addresses based on the configuration context
@erkenes
Copy link
Contributor Author

erkenes commented Sep 15, 2022

This improvement adds the support for eel-helpers in finishers.
You can use it i. e. in an email finisher:

finishers:
  -
    identifier: 'Neos.Form:Email'
    options:
      subject: "${Configuration.setting('Foo.Bar.Site.Forms.ContactForm.subject')}"
      recipientAddress: "${Configuration.setting('Foo.Bar.Site.Forms.ContactForm.recipientAddress')}"
      recipientName: "${Configuration.setting('Foo.Bar.Site.Forms.ContactForm.recipientName')}"
      senderAddress: '{email}'
      senderName: '{name}'
      replyToAddress: '{email}'
      format: 'plaintext'
      allowEelParsingForOptions:
        subject: true
        recipientAddress: true
        recipientName: true
      testMode: true

And change the options dynamically with the settings:

# Packages/Sites/Foo.Bar.Site/Configuration/Settings.yaml
Foo:
  Bar:
    Site:
      Forms:
        ContactForm:
          recipientAddress: '[email protected]'
          subject: '[DEV] Contact Form'
          recipientName: 'Your Dev Name'
# Configuration/Production/Settings.yaml
Foo:
  Bar:
    Site:
      Forms:
        ContactForm:
          recipientAddress: '[email protected]'
          subject: 'Contact Form'
          recipientName: 'Foo-Bar Support'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant