Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not the designers fault that browsers provide ridiculously bad default form controls with almost no way of styling them. Really, we have WASM, Bluetooth APIs in JS, and boatloads of other extremely advanced engineering feats in browsers -- but they can't be bothered to provide usable form elements? Just imagine all the developer time wasted on creating progress bars or date pickers...


FormData is hilarious.

https://developer.mozilla.org/en-US/docs/Web/API/FormData

Uhh, JSON would have been nice I guess?

When I got frustrated with the user needing to be able to re-edit a form with waaay to many fields and the option to add more fields of various exotic types. I wrote a hilarious hack where I just went over the input elements and elm.setAttribute("value", elm.value). Then I rip out the entire form innerHTML, POST it and store it in the database. Want to edit it again? Here you go! When displaying the content wrap the form in: <fieldset disabled="disabled"> and add some border:0;color:black

For such a terrible idea it looked remarkably clean.


Yeah, aside from <optgroup> there hasn't been much improvement in that area (well maybe fieldset and related) in that space.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: