---
title: "[SaveToDatabase]"
manual: "Form"
version: "main"
permalink: "https://docs.typo3.org/permalink/typo3/cms-form:prototypes-prototypeidentifier-finishersdefinition-savetodatabase@main"
source: "I/Config/proto/finishersDefinition/finishers/SaveToDatabase.rst"
rendered: "2026-09-19T16:47:20+00:00"
---

# \[SaveToDatabase\] {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase}

## Properties {#prototypes-prototypeidentifier-finishersdefinitionsavetodatabase-properties}

### implementationClassName {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-implementationclassname}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.implementationClassName

-   ***Data type***

    string

-   ***Needed by***

    Frontend

-   ***Mandatory***

    Yes

-   ***Default value***

    ```yaml
    SaveToDatabase:
      implementationClassName: TYPO3\CMS\Form\Domain\Finishers\SaveToDatabaseFinisher
    ```

-   ***Good to know***

    -   ["Custom finisher implementations"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations@main)

-   ***Description***

    Classname which implements the finisher.

### options.table {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-table}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.table

-   ***Data type***

    string

-   ***Needed by***

    Frontend

-   ***Mandatory***

    Yes

-   ***Default value***

    null

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    Insert or update values into this table.

### options.mode {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-mode}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.mode

-   ***Data type***

    string

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    'insert'

-   ***Possible values***

    insert/ update

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    `insert` will create a new database row with the values from the submitted form and/or some predefined values. @see options.elements and options.databaseFieldMappings

    `update` will update a given database row with the values from the submitted form and/or some predefined values. 'options.whereClause' is then required.

### options.whereClause {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-whereclause}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.whereClause

-   ***Data type***

    array

-   ***Needed by***

    Frontend

-   ***Mandatory***

    Yes, if mode = update

-   ***Default value***

    empty array

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    This where clause will be used for a database update action.

### options.elements {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-elements}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.elements

-   ***Data type***

    array

-   ***Needed by***

    Frontend

-   ***Mandatory***

    Yes

-   ***Default value***

    empty array

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    Use `options.elements` to map form element values to existing database columns.
    Each key within `options.elements` has to match with a form element identifier.
    The value for each key within `options.elements` is an array with additional informations.

### options.elements.\<formElementIdentifier>.mapOnDatabaseColumn {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-elements-formelementidentifier-mapondatabasecolumn}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.elements.\<formElementIdentifier>.mapOnDatabaseColumn

-   ***Data type***

    string

-   ***Needed by***

    Frontend

-   ***Mandatory***

    Yes

-   ***Default value***

    undefined

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    The value from the submitted form element with the identifier `<formElementIdentifier>` will be written into this database column.

### options.elements.\<formElementIdentifier>.saveFileIdentifierInsteadOfUid {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-elements-formelementidentifier-savefileidentifierinsteadofuid}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.elements.\<formElementIdentifier>.saveFileIdentifierInsteadOfUid

-   ***Data type***

    bool

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    false

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    Set this to true if the database column should not be written if the value from the submitted form element with the identifier
    `<formElementIdentifier>` is empty (think about password fields etc.).

    This setting only rules for form elements which creates a FAL object like `FileUpload` or `ImageUpload`.
    By default, the uid of the FAL object will be written into the database column. Set this to true if you want to store the
    FAL identifier (1:/user_uploads/some_uploaded_pic.jpg) instead.

### options.elements.\<formElementIdentifier>.skipIfValueIsEmpty {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-elements-formelementidentifier-skipifvalueisempty}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.elements.\<formElementIdentifier>.skipIfValueIsEmpty

-   ***Data type***

    bool

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    false

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    Set this to true if the database column should not be written if the value from the submitted form element with the identifier
    `<formElementIdentifier>` is empty (think about password fields etc.). Empty means strings without content, whitespace
    is valid content.

### options.elements.\<formElementIdentifier>.hashed {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-elements-formelementidentifier-hashed}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.elements.\<formElementIdentifier>.hashed

-   ***Data type***

    bool

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    false

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    Set this to true if the value from the submitted form element should be hashed before writing into the database.

### options.elements.\<formElementIdentifier>.dateFormat {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-elements-formelementidentifier-dateformat}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.elements.\<formElementIdentifier>.dateFormat

-   ***Data type***

    string

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    'U'

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    If the internal Datatype is DateTime which is true for the form element type "Date",
    the object needs to be converted into a string value.
    This option allows you to define the format of the date.
    You can use every format accepted by PHP's date() function ([https://php.net/manual/en/function.date.php#refsect1-function.date-parameters](https://php.net/manual/en/function.date.php#refsect1-function.date-parameters)).
    The default value is "U" which means a Unix timestamp.

### options.databaseColumnMappings {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-databasecolumnmappings}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.databaseColumnMappings

-   ***Data type***

    array

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    empty array

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    Use this to map database columns to static values.
    Each key within `options.databaseColumnMappings` has to match with an existing database column.
    The value for each key within `options.databaseColumnMappings` is an array with additional informations.

    This mapping is done *before* the `options.element` mapping.
    This means if you map a database column to a value through `options.databaseColumnMappings` and map a submitted
    form element value to the same database column through `options.element`, the submitted form element value
    will override the value you set within `options.databaseColumnMappings`.

### options.databaseColumnMappings.\<databaseColumnName>.value {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-databasecolumnmappings-databasecolumnname-value}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.databaseColumnMappings.\<databaseColumnName>.value

-   ***Data type***

    string

-   ***Needed by***

    Frontend

-   ***Mandatory***

    Yes

-   ***Default value***

    undefined

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    The value which will be written to the database column.
    You can also use the [FormRuntime accessor feature](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main) to access every getable property from the `FormRuntime`
    In short: use something like `{<formElementIdentifier>}` to get the value from the submitted form element with the identifier `<formElementIdentifier>`.

    If you use the FormRuntime accessor feature within `options.databaseColumnMappings` the functionality is nearly equal
    to the `options.elements` configuration variant.

### options.databaseColumnMappings.\<databaseColumnName>.skipIfValueIsEmpty {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-databasecolumnmappings-databasecolumnname-skipifvalueisempty}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.databaseColumnMappings.\<databaseColumnName>.skipIfValueIsEmpty

-   ***Data type***

    bool

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    undefined

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)

-   ***Description***

    Set this to true if the database column should not be written if the value from `options.databaseColumnMappings.
    <databaseColumnName>.value` is empty. Empty means strings without content, whitespace is valid content.

### options.translation.propertiesExcludedFromTranslation {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-translation-propertiesexcludedfromtranslation}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.translation.propertiesExcludedFromTranslation

-   ***Data type***

    array

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    undefined

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)
    -   ["Translate finisher options"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-frontendrendering-translation-finishers@main)

-   ***Description***

    Localization from translation files will be skipped for all specified finisher options.

### options.translation.translationFiles {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-options-translation-translationfiles}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.translation.translationFiles

-   ***Data type***

    string/ array

-   ***Needed by***

    Frontend

-   ***Mandatory***

    No

-   ***Default value***

    undefined

-   ***Good to know***

    -   ["SaveToDatabase finisher"](https://docs.typo3.org/permalink/typo3/cms-form:apireference-finisheroptions-savetodatabasefinisher@main)
    -   ["Accessing form runtime values"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-customfinisherimplementations-accessingoptions-formruntimeaccessor@main)
    -   ["Translate finisher options"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-frontendrendering-translation-finishers@main)

-   ***Description***

    If set, this translation file(s) will be used for finisher option translations.
    If not set, the translation file(s) from the 'Form' element will be used.
    Read [Translate finisher options](https://docs.typo3.org/permalink/typo3/cms-form:concepts-frontendrendering-translation-finishers@main) for more informations.

### formeditor.iconIdentifier {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-formeditor-iconidentifier}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.formEditor.iconIdentifier

-   ***Data type***

    string

-   ***Needed by***

    Backend (form editor)

-   ***Mandatory***

    Yes

-   ***Default value***

    ```yaml
    SaveToDatabase:
      formEditor:
        iconIdentifier: form-finisher
        label: formEditor.elements.Form.finisher.SaveToDatabase.editor.header.label
        predefinedDefaults:
          options: {  }
    ```

-   ***Description***

    An icon identifier which must be registered through the `\TYPO3\CMS\Core\Imaging\IconRegistry`.
    This icon will be shown within the - ["Inspector \[CollectionElementHeaderEditor\]"](https://docs.typo3.org/permalink/typo3/cms-form:prototypes-prototypeidentifier-formelementsdefinition-formelementtypeidentifier-formeditor-editors-collectionelementheadereditor@main) if the finisher is selected.

### formeditor.label {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-formeditor-label}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.formEditor.label

-   ***Data type***

    string

-   ***Needed by***

    Backend (form editor)

-   ***Mandatory***

    Yes

-   ***Default value***

    ```yaml
    SaveToDatabase:
      formEditor:
        iconIdentifier: form-finisher
        label: formEditor.elements.Form.finisher.SaveToDatabase.editor.header.label
        predefinedDefaults:
          options: {  }
    ```

-   ***Good to know***

    -   ["Translate form editor settings"](https://docs.typo3.org/permalink/typo3/cms-form:concepts-formeditor-translation-formeditor@main)

-   ***Description***

    This label will be shown within the - ["Inspector \[CollectionElementHeaderEditor\]"](https://docs.typo3.org/permalink/typo3/cms-form:prototypes-prototypeidentifier-formelementsdefinition-formelementtypeidentifier-formeditor-editors-collectionelementheadereditor@main) if the finisher is selected.

### formeditor.predefinedDefaults {#prototypes-prototypeidentifier-finishersdefinition-savetodatabase-formeditor-predefineddefaults}

-   ***Option path***

    prototypes.\<prototypeIdentifier>.finishersDefinition.SaveToDatabase.formEditor.predefinedDefaults

-   ***Data type***

    array

-   ***Needed by***

    Backend (form editor)

-   ***Mandatory***

    No

-   ***Default value***

    ```yaml
    SaveToDatabase:
      formEditor:
        iconIdentifier: form-finisher
        label: formEditor.elements.Form.finisher.SaveToDatabase.editor.header.label
        predefinedDefaults:
          options: {  }
    ```

-   ***Description***

    Defines predefined defaults for finisher options which are prefilled, if the finisher is added to a form.
