Skip to content

Commit

Permalink
Check for form data in FormContext.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jun 1, 2018
1 parent 5e32ece commit db0aeba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/View/Form/FormContext.php
Expand Up @@ -94,6 +94,11 @@ public function val($field, $options = [])
return $val;
}

$val = $this->_form->getData($field);
if ($val !== null) {
return $val;
}

if ($options['default'] !== null || !$options['schemaDefault']) {
return $options['default'];
}
Expand Down

0 comments on commit db0aeba

Please sign in to comment.