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.

Interceptor_CombineFields

With this interceptor you can combine values of different form fields into a new field, which will be accessible by other components later.

Version added

1.0.0

TypoScript path

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

Example code

initInterceptors {
	1.class = Interceptor_CombineFields
	1.config {
		combineFields {
			combined {
				fields {
					1 = name
					2 = company
				}
				separator = ,
				hideEmptyValues = 1
			}
		}
	}
}

Properties

.combineFields

Array containing options on which fields to combine.

Scheme:
[newFieldname] {
   [options]
}

Data type

Array

Version added

1.0.0

.combineFields.[fieldname].fields

Array containing existing field names. The values of these fields will be combined into the new field [fieldname].

Data type

Array

Version added

1.0.0

.combineFields.[fieldname].separator

Sets the separator to use when combining the fields.

Data type

String | cObj

Default value

Space character

Version added

1.0.0

.combineFields.[fieldname].hideEmptyValues

If set to 1, empty values will be ignored when combining.

Data type

Boolean | cObj

Version added

1.0.0