formio / formio.js

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

Elements inside Panel component share one field triggers #5752

Closed leonza123 closed 1 week ago

leonza123 commented 1 month ago

Describe the bug I have Vue JS project, I use "formiojs": "^4.19.3". I use Panel component with default configurations, that use other components. Looks, like after "Formio.createForm" function call, if element is panel and have other elements inside it, all triggers of all elements will be placed inside the first element. Initialization is using command: Formio.createForm(document.getElementById('formio'), createdForm, { In attached file "formio.constructor.input.data.json" i pasted createdForm object data. Component definition: panel: { title: 'Panelis', icon: 'list-alt', group: 'layout', key: 'panel', schema: { label: 'Panelis', type: 'panel', key: 'panel', title: 'Panelis', theme: 'default', breadcrumb: 'default', components: [], clearOnHide: false, input: false, tableView: false, persistent: false, }, }, "Constructor" component or Wizard type form (same of logic components - that have component inside them), ir Table (Data Grid, Edit Grid) with Input fields inside - these work perfectly. I could reproduce the problem only with Panel component.

Please, let me know, if I can assist any further!

Version/Branch "formiojs": "^4.19.3"

To Reproduce Steps to reproduce the behavior:

  1. Start project, add in form Builder to form Panel Component.
  2. Add to Panel component few other fields - as example, 2 Text input fields.
  3. Preview Form.
  4. Add different data to each of fields - "1" to first Text Input, "2" to second Text Input.
  5. Press Submit button. As result - after submit, second field change value to first field, so both fields have value "1"

Expected behavior Expected for fields to have different values.

Additional context formio constructor input data.json formio debugging.txt

leonza123 commented 1 month ago

I`ve tried to use newer (4.21...) or older version (4.18...) and got same result.

Tatsiana8 commented 2 weeks ago

@leonza123 unfortunately I cannot reproduce this issue. I tested in formiojs@4.21.2 using your form and your steps to reproduced, the result - Text fields have different values. Video is attached. Please let me know if I need to update steps to reproduce this issue.

https://github.com/user-attachments/assets/40ab9af5-c3ed-424e-ae9b-c3870a7b861d