[TYPO3-dev] mailform using cObj->FORM in own extension
Michael Leupold
leupold at bits.ag
Mon Oct 2 22:34:50 CEST 2006
Hi,
this is my first post to the list, though I'm not really new to typo3.
Sorry if the question I ask is stupid or answered somewhere else, but
after googling and digging the archive for several hours I thought I'd
try my luck.
I'm trying to develop a small extension for one of my customers. It's
basically just an event list with options to book events. Booking is
planned to be "very simple" - by emails sent out to the customers. And
that's where my trouble starts.
I put together a form in my extension's setup.txt:
------------------------------- zip here -------------------------------
plugin.tx_leuseminareregistration_pi1 {
anmeldungForm < tt_content.mailform.20
anmeldungForm.locationData = 1
anmeldungForm.redirect >
anmeldungForm.redirect = 65
anmeldungForm.method = POST
anmeldungForm.accessibility = 1
anmeldungForm.dataArray {
1.type = subject=hidden
1.value = Anmeldeformular
30.label = Nachname
30.type = nachname=input,40
30.required = 1
40.label = Email
40.type = email=input,40
40.required = 1
[... just some more form fields ...]
140.type = formtype_mail=submit
140.value = Anmelden
}
anmeldungForm.recipient >
anmeldungForm.recipient = name at domain.tld
anmeldungForm.layout = (some layout)
anmeldungForm.REQ = 1
anmeldungForm.REQ.layout = (some other layout)
anmeldungForm.LABEL.layout = (again some other layout)
}
------------------------------- zip here -------------------------------
Please note that I thought were unneccessary to quote. I then load the
form up somewhere in my extension script as follows:
------------------------------- zip here -------------------------------
// put some database content here
$conf['anmeldungForm.']['recipient'] = $row_seminar["email"];
// build an array to render the form to my template later
$totalArray["###FORM###"] = $this->cObj->FORM($conf['anmeldungForm.']);
------------------------------- zip here -------------------------------
I use this so I can modify hidden fields with database content (eg.
$conf['anmeldungForm.']['dataArray.']['30.']['value'] =
$row_seminar["some_column"];). Later I render the form somewhere into my
template. And indeed it gets displayed just fine (with db-content). On
submitting the redirect-page is loaded. The problem I have is that I
don't get any email - and I don't get why I don't get any email.
Do I have to handle formmailing somewhere myself in my script or is
there a way to use the built-in formmailing capabilities? Just as a
note: Sending emails from "usual" form content-elements works fine.
I'd really appreciate any little push into the right direction.
Thanks for your time,
Michael
More information about the TYPO3-dev
mailing list