Autoform, insert and add values simultaneously

Hi,

I am trying add the latitude (lat1) and longitude (lng1) from the maps (using leaflet) into an autoform in which I have created two fields as latitude and longitude. I want to add lat1 and lng1 to the autoform on those fields. Now, when the fields are visible, it is adding the values but when in the schema the latitude and longitude fields are hidden, it is unable to add the values. Here is the schema:

ComplaintSchema = new SimpleSchema({
prob_cat: {
type: String,
label: “Select a category”,
allowedValues: [‘Road’, ‘Footpath’, ‘Street Light’, ‘Median’]
},
prob_type: {
type: String,
label: “Select the problem”,
allowedValues: [‘Broken’, ‘Absent’]
},
desc: {
type: String,
label: “Description”
},
author: {
type: String,
label: “Author”,
autoValue: function () {
return this.userId
},
autoform: {
type: “hidden”,
omit: true
}
},
latitude: {
type: Number,
autoValue: function () {
return 1
},
/autoform: {
type: “hidden”,
omit: true
}
/
},
longitude: {
type: Number,
autoValue: function () {
return 1
},
autoform: {
type: “hidden”,
omit: true
}
}
});

Here is the html template (There is some problem with the way I am posting it. It is not showing template tags and button tags):

{{#autoForm collection="Complaints" id="insertComplaintForm" type="insert" class="new-complaint-form" omitFields="latitude"}} {{> afQuickField name='prob_cat' options="allowed"}} {{> afQuickField name='prob_type' options="allowed"}} {{> afQuickField name='desc'}} {{> afQuickField name='latitude' value=latitude}} {{> afQuickField name='longitude' value=longitude}}
Submit Cancel Reset
{{/autoForm}}

And here is the js file:

//this is working fine, meaning it is able to return the latitude and longitude values in those helper functions

Template.AddComplaint.helpers({
latitude: function(){
return lat1;
},
longitude: function(){
return lng1;
}
});

//I have tried this, but it seems to be not working.
Template.AddComplaint.events({
‘submit’: function () {
Complaints.insert({latitude:lat1,longitude:lng1});
Router.go(’/Home’);
}
});

Also:
I have tried adding helpers in the schema which is not possible I think. Also how to add autoValue which extracts the lat long from the map and add in the autovalue, I am unable to figure out that as well. I have also tried but unable to hide those latitude and longitude field in the html using css.

Kindly suggest what can be done.
Thanks.