     @form.formwizard("option", remoteAjax: this.ajaxEvents())
 
   goToStepId: (stepId) ->
-    console.log "Setting up goto #{stepId}"
     this.showStep(stepId)
     @form.formwizard("next")
 
+  # TODO: Try linking to the same step rather than cloning it.
   repeatStep: (step) ->
     $sourceStep = this.findStep(step.repeatOf.fieldset)
-    # console.log "Cloning repeated step #{step.repeatOf.fieldset}"
     $clonedStep = $sourceStep.clone(true, true)
     $clonedStep.css("display", "none")
     $clonedStep.attr("id", step.name)

      inDuration: 0,
      linkClass: ".#{@linkClass}",
      remoteAjax: this.ajaxEvents(),
      formOptions:
        success: (data) =>
          # console.log "Successful form POST"
          true
        beforeSubmit: (data) =>
          console.log "Sending these data to the server: #{JSON.stringify(data)}"
    this.formwizardEnabled = true

  setHiddenInput: (name, value, id, classes = "", scope = @form) ->


  createAjaxEvent: (step) ->
    ajax =
      url: @form.attr("action")
      dataType: "json"
      success: (serverData) =>
        this.handleServerData serverData
        # console.log "Successful form POST; got #{JSON.stringify(serverData)}"
      error: (event, status, errorThrown) =>
        console.log "Error response: #{event.status} #{status} - #{errorThrown} - #{event.responseText}"
        try
          appErrors = eval "(#{event.responseText})"
        catch err
          appErrors =
            model:
              unknown: [
                "There was an error communicating with the server. TurboVote staff have been notified."
              ]
        this.clearErrors()
        this.addErrorItem value[0] for key, value of appErrors.model
    ajax
