5 ms·
Together with allowing nested forms (finally), I think this would be great.
by sixbrx 4y ago
Together with allowing nested forms (finally), I think this would be great.
- TheRealPomax 4y agoForms are for sending data to URLs, what would the use-case of a nested form even be?
- Timwi 4y agoCan't speak for the OP, but more than once I've run into a case where I need the form tags to be nested in the DOM, for reasons relating to the page structure but not the form contents. I would like nested form elements to just be allowed in the DOM, and if you submit the inner form then the outer should just be ignored, and if you submit the outer it should just submit all of the form values.
- artificialLimbs 4y agoWould this not be a(nother) good use case for htmx?
- TheRealPomax 4y agoThat sounds... confusing? What is the form supposed to do when you submit it if it has another form inside it but that form's values are... a separate form? Without a concrete use-case, I'm having a hard time understanding how this would make sense.
- rickstanley 4y agoToday we have the form attribute [0] to alleviate some cases. [0]: https://caniuse.com/form-attribute https://caniuse.com/form-attribute
- megaman821 4y agoNested forms would be great if you could prefix the name attributes easily. Like filling out a form where it asks for your name and your spouse's name. Now the first name and last name keys are in the form twice.
- TheRealPomax 4y agoOkay but that's a terrible example: lots of people don't have the same last name despite being married. So you better use separate fields for that if you want "last names". But of course, programmers famously have no idea what names are, resulting in a never ending stream of "why the fuck won't you let me use the name that I have?" for anything from ecommerce to government websites, so you really shouldn't even have a separate first and last name field, you should just have a "name" field, and it bloody well better support all of unicode, because the only person who can tell you what their name is, is the person filling out the field, not you as form designer =) [1] https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-... [2] https://shinesolutions.com/2018/01/08/falsehoods-programmers-believe-about-names-with-examples/ https://shinesolutions.com/2018/01/08/falsehoods-programmers...