Set default var in accounts-base meteor


#1

please how can i set a default var when user is sign up. I’m using :

accounts-base accounts-password useraccounts:unstyled raix:handlebar-helpers aldeed:template-extension

i added a new field for users that get the referrer from the URL:

AccountsTemplates.addField({
    _id: 'ref',
    type: 'hidden'

});

And i want set it to the var getted from the URL (var ref). Also i will add an other field and i want initialise it to 0 when the user register. How can i set them in user account.