[SaveToDatabase]
Properties
implementationClassName
- Option path
- prototypes.<prototypeIdentifier>.finishersDefinition.SaveToDatabase.implementationClassName
- Data type
- string
- Needed by
- Frontend
- Mandatory
- Yes
- Default value
SaveToDatabase: implementationClassName: TYPO3\CMS\Form\Domain\Finishers\SaveToDatabaseFinisherCopied!- Good to know
- Description
-
Classname which implements the finisher.
options.table
- Option path
- prototypes.<prototypeIdentifier>.finishersDefinition.SaveToDatabase.options.table
- Data type
- string
- Needed by
- Frontend
- Mandatory
- Yes
- Default value
- null
- Good to know
- Description
- Insert or update values into this table.
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
- Description
-
insertwill create a new database row with the values from the submitted form and/or some predefined values. @see options.elements and options.databaseFieldMappingsupdatewill update a given database row with the values from the submitted form and/or some predefined values. 'options.whereClause' is then required.
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
- Description
- This where clause will be used for a database update action.
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
- Description
- Use
options.to map form element values to existing database columns. Each key withinelements options.has to match with a form element identifier. The value for each key withinelements options.is an array with additional informations.elements
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
- Description
- The value from the submitted form element with the identifier
<formwill be written into this database column.Element Identifier>
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
- Description
-
Set this to true if the database column should not be written if the value from the submitted form element with the identifier
<formis empty (think about password fields etc.).Element Identifier> This setting only rules for form elements which creates a FAL object like
FileorUpload Image. 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.Upload
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
- Description
- Set this to true if the database column should not be written if the value from the submitted form element with the identifier
<formis empty (think about password fields etc.). Empty means strings without content, whitespace is valid content.Element Identifier>
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
- Description
- If the internal Datatype is DateTime which is true for the form element types "DatePicker" and "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). The default value is "U" which means a Unix timestamp.
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
- Description
-
Use this to map database columns to static values. Each key within
options.has to match with an existing database column. The value for each key withindatabase Column Mappings options.is an array with additional informations.database Column Mappings This mapping is done before the
options.mapping. This means if you map a database column to a value throughelement options.and map a submitted form element value to the same database column throughdatabase Column Mappings options., the submitted form element value will override the value you set withinelement options..database Column Mappings
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
- Description
-
The value which will be written to the database column. You can also use the FormRuntime accessor feature to access every getable property from the
FormIn short: use something likeRuntime {<formto get the value from the submitted form element with the identifierElement Identifier>} <form.Element Identifier> If you use the FormRuntime accessor feature within
options.the functionality is nearly equal to thedatabase Column Mappings options.configuration variant.elements
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
- Description
- Set this to true if the database column should not be written if the value from
options.is empty. Empty means strings without content, whitespace is valid content.database Column Mappings. <database Column Name>. value
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
- Description
- Localization from translation files will be skipped for all specified finisher options.
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
- 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 for more informations.
formeditor.iconIdentifier
- Option path
- prototypes.<prototypeIdentifier>.finishersDefinition.SaveToDatabase.formEditor.iconIdentifier
- Data type
- string
- Needed by
- Backend (form editor)
- Mandatory
- Yes
- Default value
SaveToDatabase: formEditor: iconIdentifier: form-finisher label: formEditor.elements.Form.finisher.SaveToDatabase.editor.header.label predefinedDefaults: options: { }Copied!
- Description
-
An icon identifier which must be registered through the
\TYPO3\. This icon will be shown within the - "Inspector [CollectionElementHeaderEditor]" if the finisher is selected.CMS\ Core\ Imaging\ Icon Registry
formeditor.label
- Option path
- prototypes.<prototypeIdentifier>.finishersDefinition.SaveToDatabase.formEditor.label
- Data type
- string
- Needed by
- Backend (form editor)
- Mandatory
- Yes
- Default value
SaveToDatabase: formEditor: iconIdentifier: form-finisher label: formEditor.elements.Form.finisher.SaveToDatabase.editor.header.label predefinedDefaults: options: { }Copied!- Good to know
- Description
-
This label will be shown within the - "Inspector [CollectionElementHeaderEditor]" if the finisher is selected.
formeditor.predefinedDefaults
- Option path
- prototypes.<prototypeIdentifier>.finishersDefinition.SaveToDatabase.formEditor.predefinedDefaults
- Data type
- array
- Needed by
- Backend (form editor)
- Mandatory
- No
- Default value
SaveToDatabase: formEditor: iconIdentifier: form-finisher label: formEditor.elements.Form.finisher.SaveToDatabase.editor.header.label predefinedDefaults: options: { }Copied!
- Description
-
Defines predefined defaults for finisher options which are prefilled, if the finisher is added to a form.