Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloning a container with fields gives the container a unique name but not the fields within #54

Closed
jensjns opened this issue Apr 9, 2024 · 6 comments
Labels

Comments

@jensjns
Copy link

jensjns commented Apr 9, 2024

Environment

@vueform/builder ^1.3.2
@vueform/vueform ^1.9.4

Reproduction

.

Describe the bug

  1. Have a container with fields in it
  2. Clone the container
  3. The container receives a unique name but the fields inside the container does not
Cursor_and_Ändra_formuläret_för_Nobis_-_Selfcheck

The container with a field before cloning

Cursor_and_Ändra_formuläret_för_Nobis_-_Selfcheck

The cloned container receives a unique name, the field within does not

Additional context

No response

Logs

No response

@sallminrexhadocumerge
Copy link

I guess it's a similar issue I have too. It creates two elements both named text_1 and when I submit the form it overrides the second one even though it's correctly rendered on page.

Screen.Recording.2024-04-22.at.17.42.18.mov

@jensjns
Copy link
Author

jensjns commented May 8, 2024

Hello @adamberecz, any updates on this bug?

@adamberecz
Copy link
Collaborator

I'm currently working on this. It can be expected in the upcoming release.

@adamberecz
Copy link
Collaborator

The original issue got resolved in 1.4.3. Now, when a container is cloned all of its child elements will be renamed to the first available order.

The second (related) issue, reported by @sallminrexhadocumerge has also got addressed. We can't disallow having the same element name twice, because eg. in a nested container (ObjectElement) like billing_address, shipping_address you should be able to use the same field names. However if they are in a non-nested container (GroupElement) their data indeed would conflict. We already had a mechanism that checks for these duplicates and there was a warning about them, but in the model preview panel. These errors now got more explicit, showing the exact elements with this issue both in the form layout and on the element's panel.

Screenshot 2024-05-10 at 10 46 08

@sallminrexhadocumerge
Copy link

sallminrexhadocumerge commented May 10, 2024

thank you @adamberecz

@jensjns
Copy link
Author

jensjns commented May 15, 2024

Thanks! Just upgraded and it works, will be a much appreciated bugfix for our users 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants