[TYPO3-dev] Select box in typo3 Frontend ?
Yannick
ypavard at infoglobe.ca
Fri Dec 30 20:48:12 CET 2005
Thank you Elmar,
And that ?
http://typo3.org/fileadmin/typo3api-3.8.0/d2/d9b/classt3lib__TCEforms__FE.html
It's the same thing ?
A+
Elmar Hinz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>> I search for build a select box in Typo3 Frontend extension. Is there a
>> class for automatic building that ?
>>
>
>
>
> function makeSelection($name, $labels, $selection, $emptyLabel = '',
> $allLabel = ''){
> if($emptyLabel)
> $options .= '<option value="">' . $emptyLabel . '</option>';
> if($allLabel)
> $options .= '<option value="all">' . $allLabel . '</option>';
> foreach ($labels as $value => $label){
> $selected = ($value == $selection) ? 'selected="1" ' : '';
> $options .= '<option value="' . $value . '"' . $selected . '>' .
> $label . '</option>';
> }
> return '<select id="' .$this->prefixId . '_' . $name . '" name="'.
> $this->prefixId . '[' . $name . ']">' . $options . '</select>';
> }
>
>
More information about the TYPO3-dev
mailing list