Skip to content

rtn.value does not work in callback #29

Description

@adavid102

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: '',

});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions