如何将小部件包装在表单模块中?Bootstrap要求输入元素必须包装在<div class="controls">
.
对于标签和字段类,我已经通过
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})
});