       before:
         insert: (doc) ->
           template = getTemplate(@template)
-          # Prevent change events in the inputs during loading from submitting the form until
-          # the doc promise is resolved and the form is considered loaded.
           return false if Q.isPending(Form.whenLoaded(template))
 
         update: (modifier) ->

      _.each Form.getDocs(template), (doc) ->
        df = Q.defer()
        promises.push(df.promise)
        Form.getCollection().update doc._id, modifier, (err, result) ->
          if err then df.reject(err) else df.resolve(result)
      Q.all(promises).then(
        -> context.done()
        (err) -> context.done(err)

        helpMode = Session.get 'helpMode'
        if helpMode then addPopups() else removePopups()

      resolveFormLoaded = => 
        # Set a delayed promise for loading the form to prevent submissions before the delay due
        # to change events fired from the dropdown.
