backbone-forms icon indicating copy to clipboard operation
backbone-forms copied to clipboard

Bootstrap 3 templates

Open lincolndbryant opened this issue 12 years ago • 2 comments

I added a new bootstrap3.html that includes new template files, screenshots below.

screen shot 2013-10-14 at 8 01 50 pm screen shot 2013-10-14 at 7 46 02 pm screen shot 2013-10-14 at 7 47 32 pm

Validation Error

screen shot 2013-10-14 at 7 55 41 pm

To support bootstrap - atomic Editor els <input>, <select> all need .form-control - so the ability to specify a class to add to all els in template JS via Form.Editor.baseClassName = 'form-control'; was needed. Several classnames are added in the complex fields that do not delegate to templates (radio, checkbox) - If a PR that moves these to use templates is desired first I can do that. In addition, I expanded on the capabilities of Form options i proposed here https://github.com/powmedia/backbone-forms/pull/303 to allow the field errorClassName to be specified, it seems I cannot do that without making my own field subclass; this seems like alot of work for a common tweak.

lincolndbryant avatar Oct 15 '13 00:10 lincolndbryant

Thanks, this is great! Would be nice if you'd include the updated bootstrap-modal submodule somehow (https://github.com/wwebfor/backbone.bootstrap-modal).

fabien avatar Oct 17 '13 16:10 fabien

Where did this PR get to? Id love to see it get rolled in.

I'm also trying to get some of the Bootstrap field stuff working, and it's just frustrating with the mandatory <span> (or whatever) wrapping the actual field element.

It would be pretty awesome to see backbone-forms support all the Bootstrap form stuff.

jeff-h avatar Jul 10 '14 03:07 jeff-h