- FormSelectField 03
As the third param you can pass an options-array():
$options = array( // (prefix for the name and the id tag, - is followed by the category: 'SEL_albums') 'NameIdPrefix' => 'SEL_', // (if it should display the count of children, with genres it displays number of artists | with artists it displays number of albums etc.) 'withChildCount' => false, // (withChildCount is displayed before the Title by default, if you use a monospace it can be displayed align-right) 'forMonospace' => false, // (optional inline-css, for example: 'float:left;width:50%;') 'style' => "float:left;width:44%;" );
This example shows two forms, one with childCount and the other with childCount & forMonospace:
$options = array(
'NameIdPrefix' => 'SELALBUMS_',
'withChildCount' => true );
echo "<form id='formAlbums' action='/playlist/m3u/' method='post'>\n";
echo $fe->getFormSelect('albums', 13, $options);
echo " <br /><input type=\"Submit\" name=\"submit\" value=\"create playlist for multiple albums\">\n";
echo "</form>\n";
$options = array(
'NameIdPrefix' => 'SELALBUM_',
'withChildCount' => true,
'forMonospace' => true,
'style' => "font-family:courier,monospace;font-size:0.74em" );
echo "<form id='formAlbum' action='/playlist/m3u/' method='post'>\n";
echo $fe->getFormSelect('album', 13, $options);
echo " <br /><input type=\"Submit\" name=\"submit\" value=\"create playlist for one album\">\n";
echo "</form>\n";