mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Removed notice-level errors in ListboxField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63527 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
61ab10a8d8
commit
a34ff7589b
@ -37,21 +37,21 @@ class ListboxField extends DropdownField {
|
||||
$this->name .= '[]';
|
||||
}
|
||||
|
||||
$options = "";
|
||||
|
||||
// We have an array of values
|
||||
if(is_array($this->value)){
|
||||
// Loop through and figure out which values were selected.
|
||||
|
||||
foreach($this->source as $value => $title) {
|
||||
|
||||
// Loop through the array of values to find out if this value is selected.
|
||||
$selected = "";
|
||||
foreach($this->value as $v){
|
||||
if($value == $v){
|
||||
if($value == $v) {
|
||||
$selected = " selected=\"selected\"";
|
||||
break;
|
||||
}else{
|
||||
$selected = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$options .= "<option$selected value=\"$value\">$title</option>\n";
|
||||
}
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user