diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 081ceabc7d342a110791065e8f48c13296c3b045..9606f08532fcc6d3f5ae34e4fa21e5af2377c8d1 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -41,8 +41,8 @@ class DynamicForm extends VerySimpleModel { var $_fields; var $_dfields; - function getFields() { - if (!isset($this->_fields)) { + function getFields($cache=true) { + if (!isset($this->_fields) || !$cache) { $this->_fields = array(); foreach ($this->getDynamicFields() as $f) // TODO: Index by field name or id @@ -83,7 +83,7 @@ class DynamicForm extends VerySimpleModel { function getForm($source=false) { if (!$this->_form || $source) { - $fields = $this->getFields(); + $fields = $this->getFields(false); $this->_form = new Form($fields, $source, array( 'title'=>$this->title, 'instructions'=>$this->instructions)); }