       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) ->

        args = arguments
        template = getTemplate(@template)
        onSubmit = formArgs.onSubmit
        result = onSubmit?.apply(@, args)
        callback = => template.settings.onSubmit?.apply(@, args)
        deferCallback(result, callback)

        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.
