fix create option trait
This commit is contained in:
parent
46564f9450
commit
3dd054b298
@ -19,7 +19,11 @@ trait CreateOption
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach ($options as $val => $title) {
|
foreach ($options as $val => $title) {
|
||||||
|
if (is_numeric($value)) {
|
||||||
$selected = (int)$value === $val ? "selected" : "";
|
$selected = (int)$value === $val ? "selected" : "";
|
||||||
|
} else {
|
||||||
|
$selected = $value === $val ? "selected" : "";
|
||||||
|
}
|
||||||
$optionsString .= "<option $selected value='$val'>$title</option>";
|
$optionsString .= "<option $selected value='$val'>$title</option>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user