8000 [Form] Adding a new field as an instance of the FormBuilder · Issue #4693 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

[Form] Adding a new field as an instance of the FormBuilder #4693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yethee opened this issue Jul 1, 2012 · 0 comments
Closed

[Form] Adding a new field as an instance of the FormBuilder #4693

yethee opened this issue Jul 1, 2012 · 0 comments
Milestone

Comments

@yethee
Copy link
Contributor
yethee commented Jul 1, 2012

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.

fabpot added a commit that referenced this issue Jul 6, 2012
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: -
@fabpot fabpot closed this as completed Jul 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0