[TYPO3-english] formhandler, value.current, CASE...understanding problems
Reinhard Führicht
rf at typoheads.at
Fri Feb 10 17:38:33 CET 2012
Hi Sören
Am 10.02.2012 15:36, schrieb Sören Kracker:
> Thank you Reinhard,
>
> but this means, that it's not possible to do something like my
> switch/case depending on the value except using a userfunction? Is that
> right? A plain example: value can be A or B (nothing else), I want to
> change it to C (if it's A) and to D (if it's B).
>
I haven't tested it, but something like this should be possible:
mydbfield {
preProcessing = TEXT
preProcessing {
value =
stdWrap.cObject = CASE
stdWrap.cObject {
key.data = GP:myvar
val1 = TEXT
val1.value = a
val2 = TEXT
val2.value = b
}
}
mapping = myvar
}
Of course, if you have set a "formValuesPrefix" in your TS, then
GP:myvar should probably be GP:prefix|myvar.
Regards,
Reinhard
More information about the TYPO3-english
mailing list