mplodowski / formbuilder-plugin-public

https://octobercms.com/plugin/renatio-formbuilder
https://octobercms.com/plugin/renatio-formbuilder
2 stars 0 forks source link

Duplicate form with no field types #25

Closed slaik closed 1 year ago

slaik commented 1 year ago

Describe the bug When duplicating a form, its fields are lost

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Forms list'
  2. Click on 'Duplicate'
  3. Click on new form switch to fields
  4. It's emrty

Expected behavior In duplicate action after a replicating the form you get fields from replicated form. But you should get fields from original form

Fix In actions/DuplicateForm.php change row 24 from: foreach ($copy->fields as $field) { to: foreach ($this->form->fields as $field) {

October version 2.2.27

Plugin version 2.2.0

Additional context

Screen Shot 2022-10-13 at 23 22 51

mplodowski commented 1 year ago

Version 3.1.0 have this fixed. Thanks!