Hi,
I get undefined when trying to access rtn.value.
I'm not sure why this happens.
Could this have to do with the fact that I'm using manuel:viewmodel?
Thanks
Here's my code:
MaterializeModal.form({
bodyTemplate: 'newFamily',
callback: function(err, rtn) {
if (rtn.submit) {
for (var field in rtn.value) {
Materialize.toast(field + ": " + rtn.form[field], 5000, "green");
}
console.log("Form data", rtn.value);
}
}
});
Here's the template code:
Template.newFamily.viewmodel({
familyName: '',
uniqueId: '',
});
Hi,
I get undefined when trying to access rtn.value.
I'm not sure why this happens.
Could this have to do with the fact that I'm using manuel:viewmodel?
Thanks
Here's my code:
MaterializeModal.form({
bodyTemplate: 'newFamily',
callback: function(err, rtn) {
if (rtn.submit) {
for (var field in rtn.value) {
Materialize.toast(field + ": " + rtn.form[field], 5000, "green");
}
console.log("Form data", rtn.value);
}
}
});
Here's the template code:
Template.newFamily.viewmodel({
familyName: '',
uniqueId: '',
});