demo

- FormSelectField 04

If you create a form with one or more MultipleSelectFields you should add a quantity to limit the number of returned Songs in the playlist. If you don't do that,  the default of 25 Tracks is used! If you want the user have to select the number, you may use the following method:

  $fe->getFormSelectQuantity( $start=10, $end=50, $step=5, $size=9, $NameIdPrefix='SEL_', $style=null)

This example provides a single SelectField for a genre and a MultipleSelectField for artists and a quantity SelectField.

You may select only a Genre, or only one ore multiple Artists or any combination of it and send it to the server to get a random m3u-Playlist :-)

$options = array(
   'NameIdPrefix'   => 'SEL_',
   'withChildCount' => false,
   'forMonospace'   => false,
   'style'          => "float:left;width:44%;"
);
echo "<form id='formRandom' action='/playlist/m3u/' method='post'>\n";

echo $fe->getFormSelect('genre', 9, $options);
echo $fe->getFormSelect('artists', 9, $options);

echo $fe->getFormSelectQuantity(10, 50, 5, 9, 'SEL_', "float:left;width:10%;");

echo "  <p style='clear:both;margin:0 0 0 0'>&nbsp;</p>\n";
echo "  <input type=\"Submit\" name=\"submit\" value=\"create a random playlist\">\n";
echo "</form>\n";