如何重置autoform-select2输入框

时间:2015-06-02 06:53:46

标签: meteor jquery-select2 meteor-autoform

背景

我使用Meteor开发网络应用程序。

我安装了以下软件包:

aldeed:autoform                    5.3.0
aldeed:collection2                 2.3.1
aldeed:autoform-select2            2.0.2
natestrauser:select2               3.5.1
zimme:select2-bootstrap3-css       1.4.6

问题

我在autoform中使用了select2输入框,但在提交表单后,输入框不会重置。如何重置(即清除内容)?

初始输入框: The initial input box

插入值后,即使提交后也不会重置 After inserting values, which does not reset even after submit

这是简单架构定义:

Schemas.TutorialSession = new SimpleSchema({
    students: {
        type: [Number],
        label: "Students",
        autoform: {
            type: "select2",
            afFieldInput: {
                multiple: true
            },
            options: function() {
                return [{
                    label: "Student1",
                    value: 111
                }, {
                    label: "Student2",
                    value: 222
                }, {
                    label: "2015",
                    value: 333
                }];
            }
        }
    }
})

0 个答案:

没有答案
相关问题