Re:The right tag for the job: why you should use semantic HTML
by Varriount on Monday June 07, 2021 @12:49AM
(#27419097)
What circumstances call for nesting form elements,?
[ Parent
| on HN ]
Re:The right tag for the job: why you should use semantic HTML
by testudovictoria on Monday June 07, 2021 @03:18AM
(#27419933)
If a dev finds a form to be nested, it's usually because something was tacked on as an afterthought. I'm speaking from experience.
I had a project that had applications associated with it. Forms are the natural way to express this. There were some disclosures associated with the application, and there was a modal associated with emailing the disclosures. I needed to add some front end validations to this modal.
No matter what I tried, I could not get these validations to trigger correctly. I spent an entire work day on trying to get a library to work with this modal. It wouldn't work, because changing the modal's div to a form tag would cause errors or unexpected behavior due to the nested form tags.
TL;DR: Nothing requires it. Devs might not understand the implications.
Re:The right tag for the job: why you should use semantic HTML
by austincheney on Monday June 07, 2021 @08:47AM
(#27421910)
None. There is no good reason to do this. It doesn't stop people from doing it.
Re:The right tag for the job: why you should use semantic HTML
by MaurizioPz on Monday June 07, 2021 @03:28AM
(#27419997)
working with web forms https://docs.microsoft.com/en-us/aspnet/web-forms/ (Oh the nightmares!)