I use a powermail form and want to send the formdata to a third party script with this code.
plugin.tx_powermail.settings.setup {
marketing {
sendPost {
_enable = TEXT
_enable.value = 1
targetUrl = https://resource.de/dashboard/mail.php
values = COA
values {
10 = TEXT
10 {
field = anrede
wrap = &2=|
}
20 = TEXT
20 {
field = first_name
wrap = &first_name=|
}
30 = TEXT
30 {
field = last_name
wrap = &last_name=|
}
40 = TEXT
40 {
field = newsletter
newletter
}
50 = TEXT
50 {
field = ort
wrap = &city=|
}
60 = TEXT
60 {
field = datenschutz
wrap = &3=|
}
70= TEXT
70 {
field = email
wrap = &email=|
}
}
}
}
}
so long this works fine.
Now my problem: I only want to send this to the third party script when the field newsletter is true.
Or at least delete the field email when newsletter is false.
Is this possible?
thank you!