diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 207f7b5c1849226bc2c20b5d9c591a224f7800e6..c47433fa371dcef4bdc14f644a03506d6895a9e0 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -155,8 +155,12 @@ class DynamicForm extends VerySimpleModel { $inst = DynamicFormEntry::create( array('form_id'=>$this->get('id'), 'sort'=>$sort) ); + if ($data) $inst->setSource($data); + + $inst->_fields = $this->_fields ?: null; + return $inst; }