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

oops: Fix missing data from new form entries

parent 69f801b4
No related branches found
No related tags found
No related merge requests found
......@@ -1032,9 +1032,9 @@ class DynamicFormEntry extends VerySimpleModel {
static function create($ht=false, $data=null) {
$inst = parent::create($ht);
$inst->set('created', new SqlFunction('NOW'));
$form = $inst->getForm();
if ($data)
$form->setSource($data);
$inst->setSource($data);
$form = $inst->getForm();
foreach ($form->getFields() as $f) {
if (!$f->hasData()) continue;
$a = DynamicFormEntryAnswer::create(
......
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