I would like to transmit yes or no as value for checkboxes in Powermail (marketing.sendpost.values). If the checkbox is not selected, nothing is transmitted by default. Is it possible to set a default value per checkbox? I have created the checkbox with Text|yes
in TYPO3.
My TypoScript
300 = TEXT
300 {
data = GP:tx_powermail_pi1|field|testcheckbox|0
stdWrap {
required = 1
wrap = &testcheckbox=|
}
ifEmpty.wrap = &testcheckbox=no
}
but this does not work yet. The default value is used, but the empty field is also transmitted. eg Checkbox checked:
&testcheckbox=yes
Checkbox not checked
&testcheckbox=&testcheckbox=no
Why does it take the &testcheckbox=
in the empty checkbox?
I have found a solution that works. Maybe it helps someone else.
300 = TEXT
300 {
value = &testcheckbox=no
override {
cObject = TEXT
cObject {
required = 1
data = GP:tx_powermail_pi1|field|testcheckbox|0
wrap = &testcheckbox=|
}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.