Question T2568
Visible to All Users

Populate existing data into dynamic

created 5 years ago

I have a dynamic panel that I want to populate using application.data object. What does the data structure look like to do that?

JavaScript
appData = { "firstName": "Testy", "lastName": "Junior" }
JavaScript
"name": "EducationHistory", "title": "Education History", "elements": [ { "type": "paneldynamic", "name": "EducationHistoryPanel", "title": " ", "panelCount": 1, "minPanelCount": 1, "maxPanelCount": 5, "panelsState": "firstExpanded", "panelAddText": "Add Another School", "panelRemoveText": "Remove This School", "templateElements": [ { "title": "School", "type": "panel", "name": "School", "elements": [ { "type": "text", "name": "SchoolName", "title": "School", "maxLength": 400, "isRequired": true, "indent": 1 }, { "type": "text", "name": "SchoolLocation", "title": "Location (City/State)", "maxLength": 400, "isRequired": true, "indent": 1 }, { "type": "text", "name": "SchoolCourseOfStudy", "title": "Course of Study", "maxLength": 400, "isRequired": true, "indent": 1 }, { "type": "text", "name": "SchoolDegree", "title": "Degree Earned", "isRequired": true, "indent": 1 }, { "type": "text", "name": "SchoolGraduationDate", "title": "Graduation Date", "inputType": "date", "isRequired": true, "validators": [{"type": "expression", "text": "Invalid graduation date", "expression": "checkPastPresentDate({panel.SchoolGraduationDate})"}], "indent": 1 } ] } ] } ] },

Answers approved by surveyjs Support

created 5 years ago

Hello,
Here is the example.

Thank you,
Andrew
SurveyJS Team