i often have the requirement to send a powermail-form to diffrent recievers depending on a selection of a selectfield within the form. Im using TYPO3 7.6.x and Powermail 3.3.0 How can this be done?
相关问题
- Access fluidpage configuration in template
- How to install an extension to TYPO3 using compose
- TYPO3 Ajax Page Configuration
- Extbase query to compare two fields in same table
- TYPO3: Set more than one storage pid for one exten
相关文章
- How to get TYPO3 settings in the utility files?
- “Controller does not exist. Reflection failed.” TY
- How can i have different translations for action c
- Typo3 LTS9 Routing: ReUse config.YAML
- TYPO3 Extbase: How to sort child objects
- How to add custom wizards in typo3 7 TCA?
- Typo3 eID, how to access config
- How to access properties of a FileReference Object
With the help of @alex-kellner in the slackchannel of EXT:powermail i found a quite easy solution for that:
Basically there are 2 Steps needed:
Step1
Values for the Options in the select field. You need to add values to your option in the select field. This can be done by appending a pipe
|
to your option and simply add the valueIn addition to that, you need to know the marker / variable / individual fieldname of your field. You can find that name in the
extended
tab of your field.You can also give this field an "own" variable name if needed. The variable is wrapped with
{}
but you will not these in step 2Step 2
Now you need to add some TS in your setupfield.
Background information: Basically this changes the reciever for a form:
Now you need to check wich option was choosen in the form. This is done by a global condition:
Where
yourVariableFieldname
ist the individual fieldname from theextended
tab in the field and1
is the value of the first option (MyRecieverEmail 1)By using this TS, the form will be send to your@email.com if the first option
MyRecieverEmail 1
is choosen in the form:You can now add as much conditions as you need. The complete example would be:
Please be aware that this will be in charge for every field with the fieldname {yourVariableFieldname} in your TYPO3-Install where this TS is taken into account. This can be useful if you use this field exactly like this in multiple forms. If you dont want this to be in charge you have 2 options to avoid this:
only place the TS on the Page where your form is located.
You can add this to your global condition:
&& [globalString = GP:tx_powermail_pi1|mail|form = 123]
Where
123
is the ID of your form.This would then look like this: