-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
I am trying to make a checkbox list sortable, and retain the order of the submitted values on the server, but I noticed that the FixCheckboxInputListener always forces the submitted values back into the order of the original choices. In fact, this seems to be its specific purpose, but I'm not quite understanding why.
The specific code in question is this:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php#L57
Also, a bit earlier in the code the comments indicate that due to performance considerations we would want to work with the array of submitted values, rather than all available choices, but the loop I'm referencing loops over the long array instead..
Please let me know if I am not understanding the purpose of this class right.. otherwise I would like to fix it to retain the original order of submitted values. Happy to submit the PR to this effect.
Thank you.