Or... you could take a look at outperform. It's a small javascript form generator library that I recently wrote to support my own projects because I got fed up by the fact that all the form generators that I looked at either had a ton of dependencies, or were distinctly larger than my single page web-application.
I mean, let's face it: if my SPA is like 20KB unminified but gzipped, then I expect library routines which do something simple as generating a form to be significantly smaller. Its main features would be:
- Zero dependencies.
- Less filling (unminified but gzipped: <2KB).
- Native HTML5/browser validation support for all HTML5+ input types.
- Custom validation seemlessly integrated.
- Supports all web frameworks out there (including Bootstrap).
- Autorefills half-filled forms when reloading a page in all browsers.
- JSON set/get for all form values.