Skip to content
Snippets Groups Projects
Commit 03540bba authored by Jared Hancock's avatar Jared Hancock
Browse files

forms: Fix field lookup issue in DynamicForm::getField

parent be5d8148
No related branches found
No related tags found
No related merge requests found
......@@ -74,10 +74,13 @@ class DynamicForm extends VerySimpleModel {
return call_user_func_array($delegate, $args);
}
function getField($name) {
foreach ($this->getFields() as $f)
function getField($name, $cache=true) {
foreach ($this->getFields($cache) as $f) {
if (!strcasecmp($f->get('name'), $name))
return $f;
}
if ($cache)
return $this->getField($name, false);
}
function hasField($name) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment