From ab20b9d5a4568e9bfc3159b4088930a24e5fd471 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Tue, 8 Apr 2025 15:18:38 +0200 Subject: [PATCH] [SYNC] --- lib/src/form/src/controller.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/form/src/controller.dart b/lib/src/form/src/controller.dart index 5a1262a..5711bcc 100644 --- a/lib/src/form/src/controller.dart +++ b/lib/src/form/src/controller.dart @@ -336,7 +336,9 @@ class AstromicFormController extends FormController { // Recursively handle subgroups if (groupStructure.subGroups != null && groupStructure.subGroups!.isNotEmpty) { for (final (FormGroupStructure subGroup, int subgroupInitialCount) in groupStructure.subGroups!) { - final String nestedPrefix = '$parentPrefix${standeredGroupFormat(groupStructure.id, groupIndex, subGroup.id)}'; + final String nestedPrefix = parentPrefix.isEmpty + ? standeredGroupFormat(groupStructure.id, groupIndex, subGroup.id) // If no parentPrefix, use the group directly + : '$parentPrefix->${standeredGroupFormat(groupStructure.id, groupIndex, subGroup.id)}'; // Add to parentPrefix // Initialize subgroup controllers recursively for (int subIndex = 0; subIndex < subgroupInitialCount; subIndex++) {