使用自动窗体显示字段而不将其保存到数据库?

时间:2015-08-12 19:27:30

标签: meteor meteor-autoform

我有一个使用Meteor SimpleSchema和Auto Form的表单。
我在那里有几个字段,但我正在尝试在表单上显示一个字段(使用SimpleSchema验证),但不会保存到数据库中。

我该怎么做?

1 个答案:

答案 0 :(得分:3)

在表单上,​​您可以指定mRecyclerView = (RecyclerView)findViewById(R.id.recycler_plan_grid); mRecyclerView.setHasFixedSize(true); mLayoutManager = new GridLayoutManager(this, 3); mRecyclerView.setLayoutManager(mLayoutManager); mAdapter = new TripPlanningGridAdapter(getApplicationContext()); mRecyclerView.setAdapter(mAdapter); type="method",并在相应的meteor方法中自行处理保存到数据库。因此,您可以插入除了您不想保存的字段之外的所有字段。只需确保在流星方法中使用meteormethod="nameofmeteormethod"来检查从客户端收到的数据与AutoForm架构。