[TYPO3-english] FormHandler: using conditions in Finisher_DB

Bart van den Burg bart at samson-it.nl
Fri Dec 17 12:44:30 CET 2010


Hi

I have a contact form on my site, and I wish to insert the userdata to 
the tt_address list, but only if:
- the checkbox with the name 'nieuwsflits' was checked
- the e-mail address does not exists yet in the tt_address table

The former works fine, but how do I implement the later?

Thanks in advance!
Regards,
Bart



Typoscript so far:

	finishers.3 {
		class = Finisher_DB
		config {
			condition = nieuwsflits
			table = tt_address
			key = uid
			fields {
				gender.mapping = aanhef
				first_name.mapping = voornaam
				last_name.mapping = achternaam
				email.mapping = email
				phone.mapping = telefoonnummer
				mobile.mapping = telmobiel
				address.mapping = COA
				address.mapping {
					1 = TEXT
					1.data = GPvar:straatnaam
					2 = TEXT
					2.data = GPvar:huisnummer
					2.noTrimWrap = | | |
				}
				company.mapping = bedrijf
				city.mapping = plaats
				zip.mapping = postcode
				description = Toegevoegd via contactformulier
				module_sys_dmail_html = 1
				pid = 154
				tstamp.special = sub_tstamp
			}
		}
	}


More information about the TYPO3-english mailing list