Reputation: 8206
I have a form using Meteor SimpleSchema and Auto Form.
I have a few fields there, but I'm trying to have a field that would show up on the form (with SimpleSchema validation), but won't be saved into the Database.
How do I do that?
Upvotes: 1
Views: 202
Reputation: 681
On your form you can specify type="method"
and meteormethod="nameofmeteormethod"
and handle the saving to the database yourself in the corresponding meteor method. So you can insert all the fields except the one that you do not want to save. Just make sure to use check
in your meteor method to check the data you receive from the client against your AutoForm schema.
Upvotes: 3