Open drzraf opened 2 years ago
As a consequence we can't order as the first element.
Documentation (https://learn.getgrav.org/17/forms/blueprints/advanced-features#changing-field-ordering) states that -1
should be used.
But using -1
triggers this:
https://github.com/rockettheme/toolbox/blob/8ad2b96846eb3c32874fdbe08e01d37bfc2c9fea/Blueprints/src/BlueprintForm.php#L627-L630
... which, as expected by https://www.php.net/manual/en/function.array-splice.php put the extracted element at the end of the list.
My suggestion is to not drop explicit 0
value. A quick way is changing line 438 by
if ($location || $location === 0) {
... because https://github.com/rockettheme/toolbox/blob/8ad2b96846eb3c32874fdbe08e01d37bfc2c9fea/Blueprints/src/BlueprintForm.php#L438 keeps
$order
from being set if the location is0
because the conditional does not distinguish between0
and the empty string.