formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.9k stars 1.07k forks source link

Removes ID attributes from JSON whenever new component is added #5171

Closed Bnayak123 closed 1 year ago

Bnayak123 commented 1 year ago

Form Json

 

{   "display": "form",   "components": [     {       "label": "Text Field 123",       "applyMaskOn": "change",       "tableView": true,       "key": "textField123",       "type": "textfield",       "input": true     },     {       "label": "Text Area 123",       "applyMaskOn": "change",       "autoExpand": false,       "tableView": true,       "key": "textArea123",       "type": "textarea",       "input": true     },     {       "label": "Select",       "widget": "choicesjs",       "tableView": true,       "key": "select",       "type": "select",       "input": true     },     {       "type": "button",       "label": "Submit",       "key": "submit",       "disableOnInvalid": true,       "input": true,       "tableView": false     }   ] }

Whenever a new element is inserted into the Form any existing “id” tag is removed. For mor info refer to Attached video

Bnayak123 commented 1 year ago

https://github.com/formio/formio.js/assets/113301614/cf357ad9-d43b-4470-85fb-1d85883f4125 For above defect

travist commented 1 year ago

This is expected and is not a defect. There should not be any "id" property saved in the components since this is simply used by the "builder" as a way to keep internal track of the components. As soon as the form is saved, it is expected that the ids will be removed.