How can I wrap widgets in forms module? Bootstrap requires the input elements must be wrapped inside a <div class="controls">.
For the label and field classes, I have already acheived the required stracture by
var sport_form = forms.create({
title: fields.string({required: true
, widget: widgets.text({classes: ['not_working']})
, errorAfterField: true
, cssClasses: {
label: ['control-label'],
field: ['control-group'],
}
}),
description: fields.string({errorAfterField: true}),
date: fields.date({widget: widgets.date(), required: true, errorAfterField: true})
});
I just now committed a tutorial to the forms project on github. Here is the link https://github.com/caolan/forms#bootstrap-compatible-output
Enjoy :)