Help with updating form



I have a collection that handles default values for forms. I need to build a UI to update the default values themselves, instead of force updating via mongo backend.

I’ve used aldeed’s update-each functionality. The data is being fetched from the DB and displayed in the table. However, when I try to update by inputting new values in the textbox, it does not persist. In fact, it keeps throwing this error which i’m not aware of.

Exception in template helper: TypeError: Cannot read property 'namedContext' of undefined
    at Object.autoFormFieldIsInvalid 

As a sample, here is what I’m working with:

Mongo Collection:

meteor:PRIMARY> db.testCollection.find()
{ "_id" : ObjectId("577ccd87f57f43d790c3ec49"), "schemaName" : "test_schema", "label" : "test_lable", "value" : "test_value" }


test_schema = new SimpleSchema({
    "schemaName": {
        type: String,
    "label": {
        type: String,
    "value": {
        type: String,



<template name = "testTemplate">

<table class="table table-bordered table-condensed">
      <td style="width: 85px">Schema Name</td>
        <td style="width: 85px">Label</td>
      <td>Default Value</td>
      <td style="width: 250px">New Default Value</td>
    {{#each items}}
        {{#autoForm id=updateDefaiultsID type="update" collection=testCollection doc=this autosave=true}}
          {{> afFormGroup name="value" label=false}}



import { Template } from 'meteor/templating';
import '../templates/testTemplate.html';

if (Meteor.isServer) {

  Meteor.publish(null, function () {
    return testCollection.find();

    update: function () {
      return true;

else if (Meteor.isClient) {

    items: function () {
      return testCollection.find({}, {sort: {name: 1}});
    updateDefaiultsID: function () {
      return "testTemplate" + this._id;


(Tagging @hwillson)