HTMX forms only support multi-selects if the multiple attribute is set and not just listed
See original GitHub issueBeen using htmx on a django project and here multi-selects are indicated when the multiple attribute is listed in the select element
In HTMX the attribute has to be set:
https://github.com/bigskysoftware/htmx/blob/1f028b14da0e8d9a39221f426ef7cd266b92df02/src/htmx.js#L1479
Could this be updated so that multiselects are whenever the attribute is listed so that this is compatible with django forms?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Documentation - </> htmx
Now any element, not just anchors and forms, can issue an HTTP request ... The core of htmx is a set of attributes...
Read more >Html: For Select multiple, only one value is submitted but .val ...
When the form is submitted, only the newly selected value is submitted and not the previously set one. Whereas while debugging in Firefox,...
Read more ><select>: The HTML Select element - HTML - MDN Web Docs
This Boolean attribute indicates that multiple options can be selected in the list. If it is not specified, then only one option can...
Read more >HTML select multiple Attribute - W3Schools
The multiple attribute is a boolean attribute. When present, it specifies that multiple options can be selected at once. Selecting multiple options vary...
Read more >HTML Select Tag – How to Make a Dropdown Menu or ...
The select tag normally goes within a form element, ... as a the value of the action attribute so you don't get a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @sarahboyce, this issue is fixed in
devand should be out with the next release (sometime this week)https://github.com/bigskysoftware/htmx/commit/fda4957d653ebf683d6017c07a6ef34ed2d72983
You stars thank you all 🌟