This project is no longer maintained and no further public releases are planned.

No further support will be given.

Feel free to fork the git repository.

Logger\DB

Will log into tx_formhandler_log. The logs can be accessed via the Formhandler backend module.

NOTE: The Logger\DB will log into the database and store the UID of the inserted record into the user session. You can access this UID later on using:

$data = $GLOBALS['TSFE']->fe_user->sesData;
$uid = $data['inserted_uid'];

NOTE: The Logger\DB will be added by the controller automatically, so you don't have to specify it. However this is not the case for the loggers setting of Interceptor\AntiSpamFormTime and Interceptor\IPBlocking!

Version added

1.0.0

TypoScript path

plugin.Tx_Formhandler.settings.loggers.x copy to clipboard

Example code

plugin.Tx_Formhandler.settings.loggers {
  10 {
    class = Logger\DB
    config {
      disableIPlog = 1
    }
  }
}

Properties

.disableIPlog

Disables the IP log.

Data type

Boolean | cObj

Version added

1.0.0

.excludeFields

Comma separated list of field names to exclude from logging.

Data type

String / cObj

Version added

1.0.0

.pid

Specify where the log data is stored.

Data type

Integer - cObj

Default value

Current PID

Version added

1.0.0

.fields

Processing instructions for fields before they are logged.

Data type

Array

Version added

1.4.0

Example code

config {
    fields {
        interests.ifIsEmpty = none
        checkbox.ifIsEmpty = TEXT
        checkbox.ifIsEmpty.value = Lorem Ipsum
        email.nullIfEmpty = 1
    }
}

.fields.[form_field].ifIsEmpty

Define a default value if the user did not enter anything in the form field.

Data type

String | cObj

Version added

1.4.0

.fields.[db_field].nullIfEmpty

If the user did not enter anything in the form field, the fields is removed from logging.

Data type

Boolean | cObj

Version added

1.4.0

.fieldOrder

List of form field names to control the order the fields are logged to the database. The default order is the order of the fields in the HTML code.

Data type

Comma separated list | cObj

Version added

1.5.0

Example code

fieldOrder = name,email,message