Skip to content

Instantly share code, notes, and snippets.

@rr-it
Forked from kitzberger/FormSetup.yaml
Created February 12, 2022 17:22
Show Gist options
  • Save rr-it/6c0011f0d58478fad1214edc1211d1e6 to your computer and use it in GitHub Desktop.
Save rr-it/6c0011f0d58478fad1214edc1211d1e6 to your computer and use it in GitHub Desktop.
TYPO3 form with dynamic recipients
identifier: formWithDynRecipients
label: 'Form with dynamic recipients'
type: Form
prototypeName: standard
renderingOptions:
submitButtonLabel: Submit
finishers:
-
identifier: EmailToReceiver
options: &emailToReceiverOptions
subject: '{group} and {topic}'
recipients:
default@example.org: Default Recipient
senderAddress: '{email}'
senderName: '{name}'
format: html
attachUploads: true
translation:
language: default
useFluidEmail: true
title: 'Confirmation of your message'
-
identifier: Confirmation
options: &confirmationOptions
message: "Thanks for your message"
contentElementUid: ''
renderables:
-
renderingOptions:
previousButtonLabel: 'Previous Page'
nextButtonLabel: 'Next Step'
identifier: page-1
label: ''
type: Page
renderables:
-
defaultValue: ''
identifier: name
label: 'Your name'
type: Text
properties:
fluidAdditionalAttributes:
placeholder: 'Your name'
required: required
elementDescription: ''
validators:
-
identifier: NotEmpty
-
identifier: Alphanumeric
-
defaultValue: ''
identifier: email
label: 'Your Email'
type: Text
properties:
fluidAdditionalAttributes:
placeholder: 'Your email'
required: required
elementDescription: ''
validators:
-
identifier: NotEmpty
-
identifier: EmailAddress
-
identifier: group
type: SingleSelect
label: 'group'
properties:
options:
group1: 'Group 1'
group2: 'Group 2'
group3: 'Group 3'
prependOptionLabel: '-- Please select --'
fluidAdditionalAttributes:
required: required
validators:
-
identifier: NotEmpty
-
identifier: topic
type: SingleSelect
label: 'Topic'
properties:
options:
topic1: 'Topic One'
topic2: 'Topic Two'
prependOptionLabel: '-- Please select --'
-
renderingOptions:
previousButtonLabel: 'Previous Page'
nextButtonLabel: 'Next Step'
identifier: summarypage
label: 'Summary page'
type: SummaryPage
variants:
-
identifier: group1
condition: 'formValues["group"] == "group1"'
finishers:
-
identifier: EmailToReceiver
options:
<<: *emailToReceiverOptions
recipients:
group1@example.org: '{group}'
-
identifier: Confirmation
options:
<<: *confirmationOptions
-
identifier: group2_and_topic1
condition: 'formValues["group"] == "group2" && formValues["topic"] == "topic1"'
finishers:
-
identifier: EmailToReceiver
options:
<<: *emailToReceiverOptions
recipients:
group2-topic1@example.org: '{group} {topic}'
-
identifier: Confirmation
options:
<<: *confirmationOptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment