Commit 8ab33cf8 authored by Taylor Otwell's avatar Taylor Otwell

added support for select multiple.

parent 5bd0f27d
...@@ -381,7 +381,14 @@ class Form { ...@@ -381,7 +381,14 @@ class Form {
*/ */
protected static function option($value, $display, $selected) protected static function option($value, $display, $selected)
{ {
$selected = ($value == $selected) ? 'selected' : null; if (is_array($selected))
{
$selected = (in_array($value, $selected)) ? 'selected' : null;
}
else
{
$selected = ($value == $selected) ? 'selected' : null;
}
$attributes = array('value' => HTML::entities($value), 'selected' => $selected); $attributes = array('value' => HTML::entities($value), 'selected' => $selected);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment