Hello,
Just found out that in case of a multiple select, the values of the
array could be catched like this:
TSFE:fe_user|sesData|powermail_285|uid9|0
So the TS for a multiple select with 4 options looks like this:
...
# Copy over to second selectbox, then catch values in case
# of a multiple select (4 options)
# First option
20 < .10
20.3.data = TSFE:fe_user|sesData|powermail_285|uid9|0
# Second option
21 < .10
21.3.data = TSFE:fe_user|sesData|powermail_285|uid9|1
#Third option
22 < .10
22.3.data = TSFE:fe_user|sesData|powermail_285|uid9|2
#Fourth option
23 < .10
23.3.data = TSFE:fe_user|sesData|powermail_285|uid9|3
...
Checked and works ok!!!
Regards,
Bert
On 5/10/12 12:51 PM, Bert Hiddink [BENDOO e-work solutions] wrote:
Hello,
I use Powermail as a FE-form for submitting news, the db-inserts I do
with the snippet below. This works just fine, also inserting categories
in the mm-table works fine (please look at the snippet below).
However, in case of a "multiple select", the form submits the value as
an array, "powermail_select powermail_uid9" becomes "powermail_select
powermail_uid9[]"
So in order to insert this array in the tt_news-table, I would have to
split the array before inserting, something like:
...
20.3.split {
token = ,
cObjNum = 1
1.current = 1
}
...
Tried several option but could not get this working. Any hints/ideas to
get me going again?
Thanks in advance!
Bert
#Working snippet for tt_news & categories, TODO: multiple selects
plugin.tx_powermail_pi1 {
dbEntry {
tt_news {
_enable = TEXT
_enable.value = 1
_mm = COA
_mm {
10 = COA
10 {
# 1 is always the mm table
1 = TEXT
1.value = tt_news_cat_mm
# 2 is always the other table
2 = TEXT
2.value = tt_news_cat
# 3 is always the uid of the other table to get a relation to this
# (in this case uid_foreign of tt_news_cat_mm), first selectbox
3 = TEXT
3.data = TSFE:fe_user|sesData|powermail_285|uid7
}
# Copy over to second selectbox, than to the third, etc...
20 < .10
20.3.data = TSFE:fe_user|sesData|powermail_285|uid9
}
pid = TEXT
pid.value=18
tstamp = TEXT
tstamp.data = date:U
crdate = TEXT
crdate.data = date:U
datetime = TEXT
datetime.data = date:U
title = TEXT
title.data = TSFE:fe_user|sesData|powermail_285|uid1
bodytext = TEXT
bodytext.data = TSFE:fe_user|sesData|powermail_285|uid2
bodytext.stripHtml = 1
}
}
}
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english