autoForm update-pushArray not working, no error


#1

Hello,

I am trying to do an update-pushArray to add notes to a customer. I am getting no errors, yet the item is not being added to the collection.

Template:

{{# autoForm collection="Contacts" doc=thiscontact id="newNote" type="update-pushArray" scope="notes"}}
                {{> afQuickField name='note' rows=6}}
                <button type="submit" class="btn btn-primary">Insert</button>
              {{/autoForm}}

Schema:

ContactsSchema = new SimpleSchema({
  firstName:{
    type:String,autoform:{
      placeholder:"First Name",
      label:false
    }
  },
  lastName:{
    type: String,
    autoform:{
      placeholder:"Last Name",
      label:false
    }
  },
  email:{
    type: String,
    autoform:{
      placeholder:"E-mail",
      label:false
    }
  },
  phone:{
    type: String,
    autoform:{
      mask: '(000)000-0000',
      type: 'masked-input',
      placeholder:"Phone # (000)000-0000",
      label:false
    }
  },
  childName:{
    type: String,
    autoform:{
      placeholder:"Child Name",
      label:false
    }
  },
  childGrade:{
    type: Number,
    autoform:{
      options:{
        1 : "1st",
        2 : "2nd",
        3 : "3rd",
        4 : "4th",
        5 : "5th",
        6 : "6th"
      },
      placeholder:"Grade",
      label:false
    }
  },
  message:{
    type:String,
    autoform:{
      placeholder:"Message for us.",
      label:false
    },
    optional:true,
  },
  notes:{
    type: Array,
    optional:true,
  },
  'notes.$' :{
    type: Object
  },
  'notes.$.note' :{
    type: String
  }
});