From 16d532bb2eade2d67d7c18a25e49e4dcf75ca04d Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 29 Feb 2016 14:17:00 +0200 Subject: [PATCH] Blueprints: Fix empty values in admin fields --- system/src/Grav/Common/Data/BlueprintForm.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/src/Grav/Common/Data/BlueprintForm.php b/system/src/Grav/Common/Data/BlueprintForm.php index 236603519..64aecdffc 100644 --- a/system/src/Grav/Common/Data/BlueprintForm.php +++ b/system/src/Grav/Common/Data/BlueprintForm.php @@ -325,8 +325,14 @@ abstract class BlueprintForm implements \ArrayAccess, ExportInterface { $ordering = ''; $order = []; + $field = end($path) === 'fields'; foreach ($items as $key => &$item) { + // Set name for nested field. + if ($field && isset($item['type'])) { + $item['name'] = $key; + } + // Handle special instructions in the form. if (!empty($key) && ($key[0] === '@' || $key[strlen($key) - 1] === '@')) { $name = trim($key, '@');