       $inputs.each ->
         $input = $(@)
         id = Forms.getInputId($input)
-        value = Forms.getInputValue($input)
+        value = Form.getInputValue($input)
         values[id] = value
       values
+
+    Form.getInputValue = ($input) -> Forms.getInputValue($input, Form.getSchema())
 
     Form.setSubmitButtonDisabled = (disabled, template) ->
       Form.getSubmitButton(template).toggleClass('disabled', !!disabled)

      $input.val(value)
    return true

  getInputValue: ($input) ->
    if @isSelectInput($input)
      @getSelectValue($input)
    else if @isDropdown($input)
      Template.dropdown.getValue($input)

    else
      $input.prop('readonly', disabled)

  _sanitizeCompareValue: (value) ->
    # Ensure whitespace is ignored.
    if Types.isString(value) then value = value.trim()
    # Ensure empty values are null.
    if value? then JSON.stringify(value) else null

  _getObjectChanges: (oldObj, newObj) ->
    changes = {}
    # Assumes that the set of keys in newObj is a superset of those in oldObj.
    _.each newObj, (newValue, key) =>
      oldValue = oldObj[key]
      # Recursively find object diffs.
      if Types.isObject(newValue) and Types.isObject(oldValue)
        valueChanges = @_getObjectChanges(oldValue, newValue)
        unless _.isEmpty(valueChanges) then changes[key] = valueChanges
      else
        sanitizedNewValue = @_sanitizeCompareValue(newValue)
        santizedOldValue = @_sanitizeCompareValue(oldValue)
        # NOTE: Not using _.isEqual() to allow trimming strings and other logic.
        if sanitizedNewValue != santizedOldValue
          # Ensure empty values are null. Return the unsanitized value from getInputValue().
          changes[key] = newValue ? null
    changes

  getInputId: ($input) -> $input.attr('data-schema-key')

