I am trying to create a modal to only update-pushArray on a certain scope.
I am using autoform
My JS on the client
Template.prospectos.events({
'click .updateP' : function(){
var prospectosId = this._id;
Session.set('selectedClient',prospectosId);
var selectedClient = Session.get('selectedClient')
$('#updateProspectos').modal('show');
console.log(selectedClient)
}
});
Template.updateProspectos.helpers({
prospectosShow: function(){
var selectedClient = Session.get('selectedClient');
return Clientes.findOne(selectedClient);
}
})
My html
{{> quickForm id="updatePushForm"
type="update-pushArray"
collection=Collections.PeopleWithContacts
doc=selectedClient
scope="llamadas"}}
Part of my schema
llamadas:{
type:Array,
optional:true,
},
'llamadas.$': {
type: Object,
optional:true
},
'llamadas.$.fecha': {
type: String,
label:"Fecha",
optional:true,
autoform:{
afFieldInput:{
type:"date"
}
}
},
'llamadas.$.contacto':{
type:String,
optional:true,
label:"Contacto"
},
'llamadas.$.observacion':{
type:String,
optional:true,
label:"Observacion"
}
What am I not getting?