Skip to content

Conversation

@dmarkow
Copy link
Contributor

@dmarkow dmarkow commented Jan 3, 2026

Closes #4102. A couple tests are failing, but they were already failing when I first cloned the repo.

Before, it was required that all form elements be nested under the form. However, forms are allowed to have inputs located elsewhere as long as they use the form="my-form-id" attribute.

This changes it to use form.elements.namedItem(name). form.elements is already used in resetForm so this change is consistent with existing code.

Note that radio/checkboxes with the same names will return a list, whereas querySelector only returned the first result, so I'm only matching on the first element to match existing behavior. I'm not familiar enough with what exactly incCycle/deletePrivate are doing, but I can update this to run those functions on all matching elements if needed.

@SteffenDE
Copy link
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inputs with form and phx-debouce attributes cause errors when submitting

2 participants