Skip to content

Commit 484c32d

Browse files
authored
fix field collection mapping, see #370
1 parent e317c14 commit 484c32d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

UPGRADE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Upgrade Notes
22

3+
## Version 4.2.3
4+
- **[BUGFIX]**: Fix field collection mapping [#370](https://github.com/dachcom-digital/pimcore-formbuilder/issues/370)
5+
36
## Version 4.2.2
47
- **[BUGFIX]**: Export/Import Form fix [#371](https://github.com/dachcom-digital/pimcore-formbuilder/issues/371)
58

src/FormBuilderBundle/Resources/public/js/extjs/extensions/formObjectMappingEditor/formObjectTreeMapper.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Formbuilder.extjs.extensions.formObjectMappingEditorConfigurator.formObjectTreeM
8484
omFieldAttributes,
8585
outputWorkflowConfig;
8686

87-
if(node === null) {
87+
if (node === null) {
8888
return null;
8989
}
9090

@@ -191,10 +191,12 @@ Formbuilder.extjs.extensions.formObjectMappingEditorConfigurator.formObjectTreeM
191191
}
192192
};
193193

194-
// allow all container types except repeater!
195-
if (fieldData.hasOwnProperty('fields') && Ext.isArray(fieldData.fields) && (fieldData.type === 'container' && fieldData.sub_type !== 'repeater')) {
194+
if (fieldData.hasOwnProperty('fields') && Ext.isArray(fieldData.fields) && fieldData.type === 'container') {
196195
item.omContainerFields = fieldData.fields;
197-
item.children = generateFields(fieldData.fields,[])
196+
// allow all container types except repeater!
197+
if (fieldData.sub_type !== 'repeater') {
198+
item.children = generateFields(fieldData.fields, []);
199+
}
198200
}
199201

200202
// do not add any data to form item, if it has been forced disabled
@@ -279,7 +281,7 @@ Formbuilder.extjs.extensions.formObjectMappingEditorConfigurator.formObjectTreeM
279281
fieldData = this.buildFormFieldConfigFromNode(record);
280282

281283
if (fieldData === null) {
282-
return true;
284+
return false;
283285
}
284286

285287
if (fieldData.omFieldTypeIdentifier !== this.FIELD_TYPE_DATA_CLASS_FIELD) {

0 commit comments

Comments
 (0)