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

[5.x] Removing a field removes another field of same group #1178

Closed
vonscriptor opened this issue Apr 1, 2024 · 4 comments
Closed

[5.x] Removing a field removes another field of same group #1178

vonscriptor opened this issue Apr 1, 2024 · 4 comments
Assignees
Labels
issue Something isn't working correctly

Comments

@vonscriptor
Copy link

When adding and removing fields (clicking the X) sometimes the fields above it will be removed too.

The most annoying part is that this can happen with a preexisting form field. I edit a form, add new field, drag it where I want. Decide I don't need it and click the X, and it can (sometimes?) remove the field above it.

Steps to reproduce

  1. Create a new form.
  2. Add 2 Text fields.
  3. Click the X to remove the 2nd text field—both will be removed.

Expected behavior
It should only remove the one field.

Craft & Plugin Info (please complete the following information):

  • Craft Version: Pro 4.8.6
  • Freeform Version: 5.1.8
  • Freeform Edition: Pro
  • Fresh Install or Upgrade: Fresh
@vonscriptor vonscriptor added the issue Something isn't working correctly label Apr 1, 2024
@vonscriptor vonscriptor changed the title v5: Removing a field sometimes removes the field above it too [5.x] Removing a field sometimes removes the field above it too Apr 1, 2024
@kjmartens
Copy link
Contributor

Sorry for the trouble, @vonscriptor.

I know there was an issue with Group fields that we resolved recently, but I am otherwise not aware of this issue, nor can I duplicate it at the moment. I have a few questions... 🙂

  1. Can you consistently reproduce this issue by having a blank form and then adding 2 Text fields, and deleting one of them? And if so, is there a specific pattern? Like, are the fields added by clicking or dragging into the layout? Is it always the 2nd one being deleted that causes the 1st one to also be deleted? Does it only happen when the fields are on their own row (and one above it deletes too) or does it happen when they're in the same row, etc?
  2. Which browser are you using? And does the issue happen consistently in other browsers?
  3. Are you seeing any JS errors logged in the console when this happens?

Thanks!

@kjmartens kjmartens self-assigned this Apr 1, 2024
@vonscriptor
Copy link
Author

  1. Yes, every time. Doesn't seem to matter which fields, how I add them, or if they are on their own rows. It might not always be the one above it, might be one that comes after it too (not even directly after). It seems to happen to the field group type—if you add 3 Files field and delete the 1st it'll delete another field from the group (not always the one after, maybe the last).
  2. Browser doesn't seem to matter as they all have the issue—I've tried Chrome, Safari, and Firefox.
  3. No errors in the inspector console.

@vonscriptor vonscriptor changed the title [5.x] Removing a field sometimes removes the field above it too [5.x] Removing a field removes another field of same group Apr 2, 2024
@kjmartens
Copy link
Contributor

@vonscriptor, we made another somewhat related fix in Freeform 5.1.9 (available now). I'm not sure if it will address this issue for you, but can you check and see if it does? Thanks! 🙂

@vonscriptor
Copy link
Author

Thanks @kjmartens! It appears to be fixed in my initial testing. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue Something isn't working correctly
Development

No branches or pull requests

2 participants