如何将 html 数据列表字段添加到 meteor aldeed:autoform.



我在aldeed:autoform中用集合填充了一个选择输入字段。

现场声明

{{> afFormGroup name="patientID" type="select" options=patientIDs}}

助手

patientIDs:function () {
    return Meteor.users.find({}).map(function (user) {
        return {label: user.profile.firstName, value: user._id};
    });
}

但事实证明,下拉列表太大而无法选择选项。因此,我需要在自动表单中实现类似于 HTML 数据列表的功能。如何在 meteor aldeed:autoform 中实现这一点?

有一个用于自动表单的 select2 插件,它可能有助于获得您想要的东西。看这里。

最新更新