Online Chat
 Call Us: 
Browse Submit a Ticket
Advanced Search
Rss Categories

Log submissions to a file

Author: Eileen Wilde Reference Number: AA-00154 Views: 4049 Last Updated: 02/15/2010 09:17 AM 0 Rating/ Voters

The log template is designed to record all form submissions and to present them in a suitable human-readable format to you.

Log consists of 2 files. First one is the log template. Second is the file where records will be stored. In log template you set name of your actual log file (where records will be stored) and format of record that will be added to log file.

Log templates must have the filename of the log to write to on the first line of the template. Everything after the first line will be appended (tacked onto the bottom of the file specified).

Example in config.php (path should be a relative path from FPP folder to log template file):

log_file = ../path/log_template.txt

Example of the content for a logging template (DB or CSV file) (first line is the name of file where records will be stored, this name can be any. In this case log file will be located in same folder as log template file. Here you can set path for log file, it will be relative to log template folder):



Result (the simple.csv file could contain these lines):


You can also use multiline syntax for your log:


Email: {#eMail#}
Name: {#Name#}

Result for multiline log (the simple.txt file could contain these lines):

Name: name1
Name: name2

The path to the log file in the log template is relative to the log  template file. For example: if  the log template and the log file are in the same folder, the path to the log file is just the name of log file. If the log template is in the folder 'public_html/' and the log file will be in the folder 'public_html/log/', then the path should be 'log/simple.log'
To show double quotes in CSV file correctly use csv_shielding modifier.