       formName: -> name
       # Without this a separate copy is passed across, which doesn't allow sharing data between
       # create method and form hooks.
-      doc: -> Form.getValues()
+      doc: -> Tracker.nonreactive -> Form.getValues()
       formTitle: -> Form.getFormTitle()
       formType: ->
         return if Form.isBulk()

      onSubmit: (insertDoc, updateDoc, currentDoc) ->
        args = arguments
        template = getTemplate(@template)
        console.debug 'onSubmit', args, @
        onSubmit = formArgs.onSubmit ? formArgs.hooks?.onSubmit
        result = onSubmit?.apply(@, args)
        callback = => template.settings.onSubmit?.apply(@, args)

      onSuccess: (operation, result) ->
        args = arguments
        template = getTemplate(@template)
        Form.updateDocs(template)
        Form.setUpDocs(template)
        onSuccess = formArgs.onSuccess ? formArgs.hooks?.onSuccess
        result = onSuccess?.apply(@, args)
        callback = => template.settings.onSuccess?.apply(@, args)
        deferCallback(result, callback)

      before:
        # Remove fields in the modifiers which haven't been changed.
        update: (modifier) ->
          $input = $(@autoSaveChangedElement)
          changes = Form.getDocChanges(@template)
          _.each ['$set', '$unset'], (propName) ->
            fields = modifier[propName]
            if fields?
              _.each fields, (value, key) ->
                unless changes[key]? then delete fields[key]
          modifier

      onError: (operation, error) ->
        template = getTemplate(@template)
