Skip to content

Form Prefill only creates one entry of a repeatable panel... #124

@insideaem

Description

@insideaem

Hello team,

I have written a custom prefill service for our EDS Form, it works fine except with a repeatable panel.
In that case only the first entry of the repeatable is created.

How to reproduce?
Create a form and add a repeat panel bound to $.languages
Add a text input with name language
Add a checkbox group with name proficiency
enum: 1,2,3,4
enumNames: Can read, Can write, Can understand, Can have a conversation
Create a json with the following data:
const data = {
"languages": [
{
"language": "French",
"proficiency": [
"1",
"2",
"4"
]
},
{
"language": "German",
"proficiency": [
"1"
]
},
{
"language": "Hebrew",
"proficiency": [
"2"
]
},
{
"language": "Portuguese",
"proficiency": [
"1",
"2",
"4"
]
}
]
}

After the form is loaded, open the console and execute: myForm.importData(data);
Observe that only the French language is created in the repeatable panel.

Execute myForm.exportData().
Note that the data model has all the imported languages, 4 entries.

Please note that in our case, we are not loading data per console but this is all done as part of the ootb form logic. We simply configured our custom prefill service in the backend on the EDS Form properties and it returns the above JSON.

Could you please investigate and provide a fix? This is quite urgent.

Regards,
Nono

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions