This commit is contained in:
2025-04-08 15:18:38 +02:00
parent 48280e3ff3
commit ab20b9d5a4

View File

@@ -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++) {