Symfony – Adjust Widget Order
If you are using the Symfony form framework you may have experienced issues with the order of widgets as they appear on the form. For example say you have a user table with the following columns: first_name, last_name, and dob (date of birth), and you execute the symfony ‘build-forms’ command and view your form you will see that the dob widget is in between the first_name and last_name widgets. You can change the order in the base form file in the /base form directory, but the change would be overwritten everytime you re-run the symfony ‘build-forms’ command, instead try the following:
//UserForm.class.php
public function configure()
{
$this->getWidgetSchema()->moveField('dob', sfWidgetFormSchema::AFTER, 'last_name');
}

Hi, i appreciate what you have wrote here. it’s was very helpful for me. Just one thing: you can add this directly in the form. No need to edit the base form
and you will re-run the symfony ‘build-forms’ command a lot of a time without changing anything