         else
           doc
 
+    Form.setUpFields = (template) ->
+      template = getTemplate(template)
+      schemaInputs = Form.getSchemaInputs(template)
+      _.each schemaInputs, (input, key) ->
+        # Round float fields to 2 decimal places.
+        $input = $(input.node)
+        field = input.field
+        if field.type == Number && field.decimal && formArgs.roundFloats != false
+          decimals = field.decimals ? 2
+          value = Forms.getInputValue($input)
+          value = parseFloat(value).toFixed(2)
+          Forms.setInputValue($input, value)
+
     Form.getFormTitle = ->
       collectionName = Collections.getTitle(Form.getCollection())
       singularName = Form.getSingularName()

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

      # if Form.isBulk()
      #   Form.setUpBulkFields()

      if @data.docPromise?
        Q.when(@data.docPromise).then => Form.mergeLatestDoc(@)
      

      if $submit.closest('form').length == 0
        $submit.click => $form.submit()

      schemaInputs = Form.getSchemaInputs(@)

      popupInputs = []
      hasRequiredField = false
