[Typo3-german] Werte im Formular als Liste übergeben

Sven Burkert sb at lightwerk.com
Tue Jul 19 09:31:36 CEST 2005


Hallo,

ich bin Neuling in Typo3 und hoffe ihr könnt mir helfen.

Mir ist bekannt wie man Werte als Liste übergeben kann:

<h2>Please select a category:</h2>
<form enctype="multipart/form-data" action="test1" method="post">
<input name="id" value="25" type="hidden">
<input name="categories:list" value="1" type="checkbox">Punkt 1<br>
<input name="categories:list" value="2" type="checkbox">Punkt 2<br>
<input name="categories:list" value="3" type="checkbox">Punkt 3<br>
<input name="categories:list" value="4" type="checkbox">Punkt 4<br>
<input name="" value="go" type="submit">
</form>

Die Ausgabe ist normalerweise z.B. "[2,3]". Aber in Typo3 wird bei mir immer 
nur eine Zahl ausgegeben und keine Liste.

Hier der Code der das Formular baut:

75         $theOutput .= '<h2>Please select a category:</h2>';
76         $theOutput .= '<form enctype="multipart/form-data" action="' . 
t3lib_div::linkThisScript() . '" method="POST">';
77         $theOutput .= '<input type="hidden" name="id" value="' .
$this->pObj->id . '" />';
81         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
82             'uid,cat_title',
83             'tx_chcforum_category',
84             ''
85         );
87         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
88             $theOutput .= '<input type="checkbox" name="categories:list" 
value='.$row['uid'].'>'.$row['cat_title'].'</input><br>';
89         }
91         $theOutput .= '<input type="submit" name="" value="go">';
92         $theOutput .= '</form>';
93         $categories = t3lib_div::_GP('categories');
96         $theOutput .= $categories;

Viele Grüße
Sven



More information about the TYPO3-german mailing list