Save form data to collection using meteor methods
<p>Using Meteor I'm trying to capture and save some data (name, email and age) using a form. This data should be saved in a new Meteor collection "Subscribers". My code as follows:</p>

<p><strong>Template Events</strong> (client\views\subscribe_form\subscribe_form.js)</p>

<pre><code>Template.Subscribe.events({ 
    'submit form#subscribe-form': function(event){
        // Prevent default browser form submit
        event.preventDefault();

        // Get values from the form
        var subName = $('form#subscribe-form [name=subscribe-name]').val();
        var subEmail = $('form#subscribe-form [name=subscribe-email]').val();
        var subAge = $('form#subscribe-form [name=subscribe-age]').val();

        let subscriberData = {
            name: subName,
            email: subEmail,
            age: subAge,
            createdAt: new Date()
        };

        // Insert subscriber into the collection
        Meteor.call('SubscribeNow', subscriberData, function(error, result){
            if(error){
                // Output error if subscription fails
                console.log(error.reason);
            } else {
                // Success
                console.log("Subscription successful");
                console.log(subscriberData);
                console.log( Subscribers.find() );
            }
        });
    },
});
</code></pre>

<p><strong>Server side</strong> (server\collections\subscribers.js)</p>

<pre><code>var Subscribers = new Meteor.Collection('subscribers');

Subscribers.allow({
    insert: function(){
        return true;
    }
});

Meteor.methods({
    'SubscribeNow': function (subscriberData) {
        //check(subscriberData, String);

        try {
            // Any security checks, such as logged-in user, validating data, etc.
            Subscribers.insert(subscriberData);
        } catch (error) {
            // error handling, just throw an error from here and handle it on client
            if (badThing) {
                throw new Meteor.Error('bad-thing', 'A bad thing happened.');
            }
        }
    }
});
</code></pre>

<p>Now when I add some data to the form and click the submit button it goes through the success console.log message, the data is picked-up properly but whenever I try to query the collection it won't show anything at all.</p>

<p>I tried looking for the data in the collection using a simple template I created to list the Subscribers collection in a table, also with Meteor Toys and via <code>console.log( Subscribers.find() );</code> but no luck. It seems the forms goes through but the data is not saved in the collection.</p>

<p><a href="https://i.stack.imgur.com/5q00N.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5q00N.jpg" alt="enter image description here"></a></p>

<p>Also, <em>autopublish</em> and <em>insecure</em> are removed.</p>

<p><a href="https://i.stack.imgur.com/3cP8l.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3cP8l.jpg" alt="enter image description here"></a></p>

<p>What am I doing wrong? I'm still pretty new to everything Meteor so it might be something obvious I'm missing here.</p>

<p>Let me know if you need to see more of the code. Finally, any suggestions for code improvement (structuring or such) are welcome.</p>

<p>Many thanks in advance!</p>