     # BULK EDITING
     ################################################################################################
 
-    Form.getDocs = (template) ->
+    Form.getDocs = (template, options) ->
       # For undefined docs which have not yet been resolved, return an empty doc.
-      _.map getTemplate(template).docs.get(), (value, key) -> value ? {_id: key}
+      _.map getTemplate(template).docs.get(), (value, key) ->
+        if !value? && options?.sanitizeEmpty != false
+          value = {_id: key}
+        value
 
     Form.hasDoc = (template) -> Form.getDocs(template).length > 0
     

      doc = Form.getValues(template)
      # Avoid setting original data.doc to undefined value.
      if doc? then data.doc = doc
      # NOTE: Reactive doc is undefined until doc is loaded, unlike getDoc() which may return
      # empty docs. This is to aid templates in deciding when to use the reactive doc.
      template.reactiveDoc?.set(doc)
      docs = template.docs.get()
      if data.docs? then data.docs = _.keys(docs)


      template = getTemplate(template)
      Forms.getSchemaInputs(template, formArgs.schema ? Form.getCollection())

    Form.getValues = (template, options) ->
      if Form.isBulk(template)
        Form.getBulkValues(template)
      else
        Form.getDocs(template, options)[0] ? null

    # @returns {Object} The diff between the original document and the resulting document from
    #     the current state of the form.
