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.

Generator\Csv

Generates a CSV file containing the submitted form values.

Version added

1.0.0

Properties

.linkText

The text of the link

Data type

String | cObj

Default value

Save

Version added

1.0.0

.linkTarget

.linkTarget

Data type

String | cObj

Default value

_self

Version added

2.4.0

.addFieldNames

Adds the field names in the first line of the CSV.

Data type

Boolean | cObj

Version added

1.0.0

.exportParams

List of field names to export to the CSV file.

Data type

Comma separated list | cObj

Default value

All fields

Version added

1.0.0

.delimiter

Specify your own delimiter for the CSV values

Data type

String | cObj

Default value

,

Version added

1.0.0

.enclosure

Specify your own enclosure for the CSV values. The enclosure will only be used if the value needs to be wrapped, e.g. if it contains line breaks.

Data type

String | cObj

Default value

"

Version added

1.0.0

.customTempOutputPath

Specify a custom path the generated files are stored to. This is only useful if you use the generator to attach files to an e-mail.

Data type

String | cObj

Default value

typo3temp

Version added

1.0.0

.filePrefix

The generated file name contains a random hash. You can specify a custom prefix here (E.g. formhandler)

Data type

String | cObj

Version added

1.0.0

.storeInTempFile

If set, the generator will save the output in a temporary file rather than sending it directly as content.
Required if you are using Finisher_Mail in combination with returnFileName.

Data type

Integer (0,1,2)

Version added

1.0.0

.outputFileName

If set, the generator will use this file name for the generated file.

Data type

String | cObj

Default value

formhandler.csv

Version added

2.0.0

Example code

outputFileName = formhandler-export.csv

.returnFileName

If set, the generator will only return the file name of the generated CSV.
Required if you are using Finisher\Mail in combination with storeInTempFile.

Data type

Integer (0,1,2)

Version added

1.0.0

.returnGP

If set, the Generator return the GP values rather than a file name. Use this setting to use Generator\CSV as a Finisher for generating the files only but not pushing a download. The full file path of the generated file is stored in $this->gp['generator-csv-generated-files'].

Data type

Boolean | cObj

Version added

1.7.0

.additionalParams

Array of additional parameters to be set in the generation link URL.

Data type

Array

Version added

1.4.0

Example code

additionalParams {
  param1 = TEXT
  param1.value = myValue
}

.inputEncoding

The encoding of the form data.

Data type

String | cObj

Default value

utf-8

Version added

1.5.0

.outputEncoding

The encoding of the generated CSV file.

Data type

String | cObj

Default value

utf-8

Version added

1.5.0