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

forms: Fix regression editing custom forms data

parent e7510cba
Branches
Tags
No related merge requests found
......@@ -39,6 +39,7 @@ class DynamicForm extends VerySimpleModel {
var $_form;
var $_fields;
var $_has_data = false;
var $_dfields;
function getFields($cache=true) {
......@@ -83,7 +84,7 @@ class DynamicForm extends VerySimpleModel {
function getForm($source=false) {
if (!$this->_form || $source) {
$fields = $this->getFields(false);
$fields = $this->getFields($this->_has_data);
$this->_form = new Form($fields, $source, array(
'title'=>$this->title, 'instructions'=>$this->instructions));
}
......@@ -102,6 +103,7 @@ class DynamicForm extends VerySimpleModel {
function data($data) {
if ($data instanceof DynamicFormEntry) {
$this->_fields = $data->getFields();
$this->_has_data = true;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment