mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
(mvc) add __empty__ item to OptionField as placeholder for an empty string
This commit is contained in:
parent
4934ce1221
commit
6847e4f2ee
@ -59,7 +59,11 @@ class OptionField extends BaseField
|
||||
// copy options to internal structure, make sure we don't copy in array structures
|
||||
foreach ($data as $key => $value) {
|
||||
if (!is_array($value)) {
|
||||
$this->internalOptionList[$key] = $value ;
|
||||
if ($key == "__empty__") {
|
||||
$this->internalOptionList[""] = $value ;
|
||||
} else {
|
||||
$this->internalOptionList[$key] = $value ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user