Guten Abend,
Ich bin dabei, mit Powermail 1.5.7 auf Typo3 4.4.4 ein Projekteingabeformular zu realisieren, welches die Werte in eine eigene Datenbankstruktur (EXT:browser) speichert.
Das klappt soweit wunderbar, auch die Selectboxen werden dynamisch befüllt und ohne Multiple-Auswahl wie gewünscht gespeichert.
Mit Multiple-Auswahl hingegen schaffe ich es nicht, die auf der Bestätigungsseite und in der E-Mail Werte in die Datenbank zu bekommen.
Hintergrund: Mittels einer Selectbox sollen mehrere Kantone (=Bundesländer) selektiert werden können, in welchen ein Projekt aktiv ist.
Das Prefill:
##################
# Prefill Canton #
##################
lib.canton = COA_INT
lib.canton {
10 = TEXT
10.value = <label for="uid4">Select:</label>
20 = CONTENT
20.wrap = <select id="uid4" name="tx_powermail_pi1[uid4][]" size="5" multiple="multiple">|</select>
20 {
table = tx_fmprojectdb_canton
select {
pidInList = 35
orderBy = uid
}
renderObj = COA
renderObj {
10 = COA
10 {
10 = TEXT
10 {
field = uid
wrap = <option value="|">
}
20 = TEXT
20 {
field = designation
wrap = |</option>
}
}
}
}
}
Die mm-Relation
# add mm relation to uid 2 of tt_address_group (via mm table)
tx_fmprojectdb_main._mm = COA
tx_fmprojectdb_main._mm.10 = COA
# 1 is always the mm table
tx_fmprojectdb_main._mm.10.1 = TEXT
tx_fmprojectdb_main._mm.10.1.value = tx_fmprojectdb_main_canton_mm
# 2 is always the other table
tx_fmprojectdb_main._mm.10.2 = TEXT
tx_fmprojectdb_main._mm.10.2.value = tx_fmprojectdb_canton
# 3 is always the uid of the other table to get a relation to this (in this case uid2 of tt_address_group)
tx_fmprojectdb_main._mm.10.3 = TEXT
tx_fmprojectdb_main._mm.10.3.data = TSFE:fe_user|sesData|powermail_188|uid4
Und die Abfrage / Speicherung:
tx_fmprojectdb_main.canton = TEXT
tx_fmprojectdb_main.canton.data = TSFE:fe_user|sesData|powermail_188|uid4
Im Manual steht folgendes, was vermutlich auf den richtigen Weg hinweist:
tt_address.company = TEXT
tt_address.company.data = TSFE:fe_user|sesData|powermail_88|uid21|1
Wie kann man der Selectbox diese Unter-IDs dynamisch mitgeben?
Wie genau müssen die Werte aus der Multiple-Selectbox in die Datenbank geschrieben werden?
Ein kleiner (oder grosser) Anstoss wäre super, herzlichen Dank im voraus!