htmx icon indicating copy to clipboard operation
htmx copied to clipboard

[Docs] Clarify that hx-include does not include disabled inputs

Open fpecserke opened this issue 1 year ago • 2 comments

Problem Definition

Hi, I just spent 2 hours debugging why the values are not included, until I realized that the reason is there is a disabled tag in my element (I don't want it to be editable). I replaced it with readonly and it worked.

Spec compliance

This behavior is up to spec.

Suggested solution

I just want to add this info to the docs under Notes to save people's time when they have a similar use-case and lack of knowledge in web standards just like me.

Similar issues

Similar issues were submitted in the past (#2158 - form data overriding hx-include , #2384 - name attribute required) but this is a separate problem.

I am willing to create a PR for all of them, as it is a simple docs change and is appropriate for my first commit.

fpecserke avatar Dec 02 '24 11:12 fpecserke

Hello, sure, sounds like a common gotcha. Feel free to open a documentation PR!

Telroshan avatar Dec 03 '24 07:12 Telroshan

Okay, I am on it .. I will spend some time on it, if anyone wants to add something else to add, let me know

fpecserke avatar Dec 13 '24 23:12 fpecserke

Ran into the same gotcha. Docs PR opened.

kontur avatar Apr 16 '25 08:04 kontur