-
-
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
hx-disabled-elt documentation #3081
Comments
Hey, are you using the latest htmx version, i.e. v2.0.4? |
Yes, I am using 2.0.4. The problem isn't with multiple selector per se, each selector do match. The problem is that each selector will only match a single first element, which is surprising behaviour (to me at least). So coming to the documentation and seeing the example made me think I could extend it and use it in a bigger form with multiple text inputs. Example:
In this case only The description of the original example is:
Note, it says "buttons" (plural), and "input fields" (plural). The documentation does say that Maybe there could be another operator Am I making sense? Thanks for a great project! |
Oh right I see, thanks for the details, completely agree with you on that. There's an ongoing proposal to support a new keyword to As for the documentation, it's indeed incorrect to say those in plural form, feel free to open a PR if you feel like fixing it! Also, note that for the time being, a workaround for this is to use a standard CSS selector (which always returned all matches in htmx's dev history) |
The current hx-disabled-elt documentation says the following
It then gives the following example
It should be noted that only the first text input field is disabled which is somewhat surprising when you have multiple in your form! I think this could be made clearer :-)
I think a less contrived example for disabling multiple input fields is using fieldsets.
Cheers!
The text was updated successfully, but these errors were encountered: