Skip to content

Commit

Permalink
Fix add ns
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Dec 25, 2023
1 parent 05ca337 commit faacc19
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/form/src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,10 @@ public function add(string $name, mixed $field, ?string $fieldset = null): Abstr

$field->setName($name);

if ($namespace) {
$field->setNamespace($namespace);
}
$namespace = implode('/', $this->namespaceStack) . '/' . $namespace;
$namespace = trim($namespace, '/') ?: null;

return $this->addField($field, $fieldset);
return $this->addField($field, $fieldset, $namespace);
}

public function addField(
Expand Down

0 comments on commit faacc19

Please sign in to comment.