Method:
selectedBoxValue()
Class:
FORM
Method Call:
include_once("core/html/FORM.php");
STRING FORM::selectedBoxValue(STRING: $label, STRING: $name, ASSOC_ARRAY: $options, STRING: $selected, [INT: $size, INT: $override]);
Unlike selectedBox(), this method sets the value parameter of the option tag to the key of the associative array $options.
Usage:If $options is:
array( "en" => "English", "de" => "Deutsch", "ts" => "Tsetswana", );then
$pString = FORM::selectedBoxValue(FALSE, "language", $options, "ts");would return the string:
<select name="language" size="3"> <option value="en">English</option> <option value="de">Deutsch</option> <option value="ts" selected>Tsetswana</option> </select>