Commit 7f0a25a1 authored by Ad Schellevis's avatar Ad Schellevis

(mvc) "none" option to optional field in OptionField type

parent 6873c250
......@@ -76,6 +76,10 @@ class OptionField extends BaseField
public function getNodeData()
{
$result = array ();
// if relation is not required, add empty option
if (!$this->internalIsRequired) {
$result[""] = array("value"=>"none", "selected" => 0);
}
foreach ($this->internalOptionList as $optKey => $optValue) {
if ($optKey == $this->internalValue) {
$selected = 1;
......
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