I attach the document as the data context of addCrop template. When the autoform in it is submitted successfully, I want to get the _id in this data context. I am assuming that I can get it from template parameter. But, I do not know how to do it.
AutoForm.addHooks(['addCrop'], {
onSuccess: function(operation, result, template) {
var _id = template.????
Router.go("cropEdit", {_id: _id});
}
});