0

如何将小部件包装在表单模块中?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})
});
4

1 回答 1

1

我刚刚在 github 上提交了表单项目的教程。这是链接https://github.com/caolan/forms#bootstrap-compatible-output

享受 :)

于 2013-07-12T10:56:28.570 回答