         # Don't restart the import if an import is running.
         unless @model.get 'isImporting'
             slug = @model.get 'slug'
-            importDate = $("##{slug}-import-date").val()
+            date = $("##{slug}-import-date").val()
 
             @hideErrors()
-
-            fieldValues =
-                date: importDate
-
-            for name, val of @model.get 'fields'
-
-                # For folder fields, it requires to convert the value (a folder
-                # id) to a folder path.
-                if val is 'folder'
-                    fieldValues[name] = @getFolderPath slug, name
-
-                # For simple fields, just get the value of the field.
-                else
-                    fieldValues[name] = $("##{slug}-#{name}-input").val()
+            fieldValuesSet = []
+            for i, values of @values
+                fieldValuesSet.push @getFieldValues i
+            @values = fieldValuesSet
 
             # Auto import interval and start date work separately from field
             # values

            else
                alert t 'konnector deleted'
                @model.set 'lastAutoImport', null
                @model.set 'fieldValues', {}
                @model.set 'password', '{}'
                window.router.navigate '', trigger: true


        @$('.error').hide()


    # When add button is clicked, it grabs account values currently set in
    # fields. Then, it adds an empty account to this list. The empty account
    # will lead the rendering operation to a new set of fields. Such, the user
    # will be able to configure a new account.
    onAddClicked: ->
        values = []
        for i in [0..(@values.length - 1)]
            values.push @getFieldValues i
        values.push {}
        @values = values

        @render()
        @$('#add-button').hide() if @values.length > 4


    # When remove button is clicked, it grabs account values currently set in
    # fields. Then, it removes last account from this list. It will lead
    # the rendering to remove the fields for the last account.
    onRemoveClicked: ->
        values = []
        for i in [0..(@values.length - 1)]
            values.push @getFieldValues i
        values.pop()
        @values = values

        @render()
        @$('#add-button').hide() if @values.length > 4



    # Get values for account located at given index.
    getFieldValues: (index) ->
        slug = @model.get 'slug'
        fieldValues = {}

        for name, val of @model.get 'fields'

            # For folder fields, it requires to convert the value (a folder
            # id) to a folder path.
            if val is 'folder'
                fieldValues[name] = @getFolderPath slug, name, index

            # For simple fields, just get the value of the field.
            else
                fieldValues[name] = $("##{slug}-#{name}#{index}-input").val()
        fieldValues


    # Grab data from field. Make data compatible with expected konnector input.
    # Then ask to the backend to run the import.
    onImportClicked: ->
