symfony/symfony — pull request #6111 by egeloen (2012-11-24 19:46:45+00:00)
Title: [Form] Implement field order

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5827 #4254 #3452
Todo: -
License of the code: MIT
Documentation PR: ~

This PR adds the ability to set fields order via two new options: `before` & `after`.

These options represent respectively the field name just before the field & the field name just after the field.

If none of the two options is given, the current behavior is maintained (fields order is determined by the way you added your fields on your builder). If you partially order your fields, the default behavior will be overridden by your explicit order.