CodeIgniter Forums
Bootstrap Form Builder - creating consistent form elements with lesser code - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Bootstrap Form Builder - creating consistent form elements with lesser code (/showthread.php?tid=56251)



Bootstrap Form Builder - creating consistent form elements with lesser code - El Forum - 12-05-2012

[eluser]Zwacky[/eluser]
hay guise

i've been working on a project and thought i'd share my form library, since i haven't found anything that covers the similar scope. It's hosted on https://github.com/zwacky/codeigniter_form_builder.

live example of form output
http://www.mietzentrale.ch/vermieter - although for client accounts there are way way more forms.

alrighty, any dependancies?
- CodeIgniter (duh)
- http://twitter.github.com/bootstrap/

I also added a rather complete readme on github as the documentation with images and example code to see what it does.
i hope this can help, if somebody needs to do extensive use of forms - as my last project did.


Bootstrap Form Builder - creating consistent form elements with lesser code - El Forum - 12-05-2012

[eluser]ChiefAlchemist[/eluser]
Interesting. Thx. I've been trying to find some time to consume Bootstrap.

Question: Is it best to use so many divs? Why not just a list? Or does Bootstrap not like that approach?


Bootstrap Form Builder - creating consistent form elements with lesser code - El Forum - 12-05-2012

[eluser]Zwacky[/eluser]
it's from bootstrap, although imho it looks fine. also the elements are nested in groups, so that might look bloated to you.

the library also automatically adds error visualisation (example in www.mietzentrale.ch/vermieter when using the submit button without filling out the form).
this is taken from the errors in the form_validation library through form_error($id), whereas $id is the id of the form entered.


Bootstrap Form Builder - creating consistent form elements with lesser code - El Forum - 12-05-2012

[eluser]ChiefAlchemist[/eluser]
Fair enough. If that's they way they do it. It just seems odd to use divs on a form. Less browser issues I bet.

So BootStrap also comes with a .js form validation in the library?


Bootstrap Form Builder - creating consistent form elements with lesser code - El Forum - 12-05-2012

[eluser]Zwacky[/eluser]
[quote author="ChiefAlchemist" date="1354743711"]So BootStrap also comes with a .js form validation in the library? [/quote]
not a validation js, but severall other sweet stuff. you can see them in action here: http://twitter.github.com/bootstrap/javascript.html

by validation i was referring to the codeigniter form validator class.


Bootstrap Form Builder - creating consistent form elements with lesser code - El Forum - 12-05-2012

[eluser]ChiefAlchemist[/eluser]
I'm familiar with Bootstrap. In fact I'm pulling together a W***P***** theme to be based on Bootstrap. Looks to be a pretty powerful tool.. It's the time to learn it I'm forever short on Sad