You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest version of the form, when defining of build of a form, if you add a new field as an instance of the FormBuilder, then this field will be in the top of the children. This is behaviour breaks order of children.
For example, build of the form:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$addressBuilder = $builder->create('address', 'form');
$builder
->add('name', 'text')
->add($addressBuilder);
}
After building of the form, we have the children in order: address, name. But expected: name, address.
The text was updated successfully, but these errors were encountered:
Commits
-------
d6e1f39 [Form] Fixed FormBuilder to maintain order of its children
Discussion
----------
[Form] Fixed FormBuilder to maintain order of its children
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4693
Todo: -
The latest version of the form, when defining of build of a form, if you add a new field as an instance of the FormBuilder, then this field will be in the top of the children. This is behaviour breaks order of children.
For example, build of the form:
After building of the form, we have the children in order:
address, name
. But expected:name, address
.The text was updated successfully, but these errors were encountered: