I use a Symfony form for display a collection of BlockType who have each a "position" field.
On the view, it’s possible to re-order each block by clicking on up/down/remove buttons:
Here all work fine
But I have a problem.
When I submit the form, inside the array collection, all position is OK, but the array collection is not ordered by block.position, result: if the form has an error, it is displayed again, but without block.position ordering (it’s the old order used, order during form init).
Is it possible to fix this problem in php please?
Source: Symfony Questions
Was this helpful?
0 / 0