node.js - node js forms (caolan) bootstrap compatible -


how can wrap widgets in forms module? bootstrap requires input elements must wrapped inside <div class="controls">.

for label , field classes, have acheived 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 committed tutorial forms project on github. here link https://github.com/caolan/forms#bootstrap-compatible-output

enjoy :)


Comments