jqh 4 years ago
parent
commit
d554c3cab9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Form/NestedForm.php

+ 2 - 2
src/Form/NestedForm.php

@@ -282,9 +282,9 @@ class NestedForm extends WidgetForm
             $this->layout()->addField($field);
         }
 
-        if (method_exists($this->form, 'builder')) {
-            $field->attribute(Field::BUILD_IGNORE, true);
+        $field->attribute(Field::BUILD_IGNORE, true);
 
+        if (method_exists($this->form, 'builder')) {
             $this->form->builder()->pushField((clone $field)->display(false));
         }