-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Exclude form elements within disabled fieldsets #2012
Conversation
I like it but this might have to go behind a config; I could imagine a situation where people are using disabled inputs to pre-populate forms and show them to the user, disable. |
Does |
It respects disable attributes directly on inputs as far as I can tell (as in, it excludes them from the form post). |
Okay let's send it, I like it |
great change, thank you! |
I totally tripped over that change. I disable a fieldset while htmx is in the process of sending the form.
fieldset.disabled {
pointer-events: none;
opacity: .75;
} At the end of the day, this is the correct implementation and I guess it's debatable if disabling form elements while in the process of sending, is great UX. Just leaving this here as context if someone searches for it. |
Description
The default behavior for browsers is to exclude form inputs from submissions when they're inside a fieldset that is disabled (tested on Chrome, Firefox and IE11).
However, when using the hx-boost attribute, these inputs are included in submissions.
Corresponding issue:
Testing
I added a test for an input within a disabled fieldset
Checklist
master
for website changes,dev
forsource changes)
approved via an issue
npm run test
) and verified that it succeeded