[TYPO3] FORM, defined using ts, not sending to email address

Andrew Davis andrew at avagraphique.com
Tue Jun 5 22:42:13 CEST 2007


the root of this problem, really, is my lack of understanding of how 
this whole mailform process works in typo3.

a normal email form, inserted on a page, works like magic. configuration 
in the data field is parsed very nicely and it sends.

but i need to pass a variable to an email form. so i am told to use 
dataArray and setup the form in TS.

easy enough, and presto, it renders on the page very nicely.

but then there is all this
temp.form < styles.content.mailform
business.

And I don not understand why i need to copy all that info from mailform. 
but ok, i do.

and then when completely setup i have to copy it back? Is populating my 
form to styles.content.mailform the only way to get a mailform to send 
in typo3? (which i cant get it to do...)

hmmmm.... I will pok some more thru documentation to try and figure it 
out, but as you can see from my 100 posts it is not coming easily.

thanks everyone for your help.................


a



Peter Klein wrote:
> Hi Andrew. I had a similar problem a while back, when I created a FCE 
> mailform element.
> I solved it by adding a "locationData" property. But since the normal 
> locationData property doesn't have stdWrap, I did it like this:
>  10 = FORM
>  10. <blah blah>
> 
>  10.locationData = 0
>  10.hiddenFields {
>   subject = TEXT
>   subject.value = Contact Me
>   subject.value.lang.dk = Kontakt mig
>   html_enabled = TEXT
>   html_enabled.value = 1
>   locationData = TEXT
>   locationData.dataWrap = {page:uid}:{field:uid}
>  }
> 
> --
> Peter Klein / Umloud Untd.
> 
> "Andrew Davis" <andrew at avagraphique.com> wrote in message 
> news:mailman.1.1180927720.21116.typo3-english at lists.netfielders.de...
>> hi,
>>
>> required fields seem to be validating, but my Mailform simply reloads page 
>> but does not send.... any ideas? Thanks much in advance
>>
>>
>>
>>
>> # we define a form object
>> temp.form = FORM
>>
>> # now we import the standard mailfrom from the styles.content class
>> temp.form < styles.content.mailform
>>
>> # we override some values
>> temp.form {
>>   layout = <p>###LABEL### <br />###FIELD###</p>
>>   labelWrap.wrap = <strong>|</strong>
>>   fieldWrap.wrap = |<br />
>>   commentWrap.wrap = |
>>   radioWrap.wrap = |&nbsp;
>>   stdWrap.wrap= |
>>   recipient = junk at avagraphique.com
>>   goodMess = Thank you for submitting your request. We will respond within 
>> 48 hours.
>>
>>   REQ = 1
>>   REQ.labelWrap = |*
>>   REQ.layout = <p>###LABEL### <br />###FIELD###</p>
>>   # redirect = 4
>>
>>   # until this point we have inserted some values, but they are not in the 
>> form, yet.
>>   # So we add our data to the form by the dataArray.
>>   # Finally we need it as hidden form element:
>>   dataArray {
>> 1.label = Request for more information
>> 1.label.wrap = <h2>|</h2>
>>
>>     10.label = Model:
>>     10.type = model=input
>>     10.value = {GPvar : model}
>> 10.value.insertData=1
>> 10.required = 1
>> 10.width = 2
>>
>> 20.label = Quantity:
>> 20.type = qty=radio
>> 20.valueArray{ 1.label = 1000
>> 1.value = 1000
>> 2.label = 5000
>> 2.value = 5000
>> 3.label = 10000
>> 3.value = 10000
>> 4.label = 50000
>> 4.value = 50000
>> 5.label = 100000
>> 5.value = 100000
>> 6.label = other
>> 6.value = see qty_other
>> }
>> 20.required = 1
>>
>> 21.label = Quantity Other:
>> 21.type= qty_other=input
>>
>> 50.label = Your Information
>> 50.label.wrap = <br / ><br /><h3>|</h3>
>>
>> 60.label = First Name:
>> 60.type= fname=input
>> 60.required = 1
>>
>> 65.label = Last Name:
>> 65.type = lname=input
>> 65.required = 1
>>
>> 70.label = Company:
>> 70.type= company=input
>> 70.required = 1
>>
>> 80.label = Email:
>> 80.type= email=input
>> 80.specialEval = EMAIL
>> 80.required = 1
>>
>> 90.label = Phone:
>> 90.type= phone=input
>> 90.required = 1
>>
>> 100.label = Fax:
>> 100.type= fax=input
>>
>> 110.label = Address:
>> 110.type= address=input
>>
>> 120.label = City:
>> 120.type= city=input
>>
>> 130.label = State:
>> 130.type= state=select
>> 130.valueArray {
>>       1.label = NY
>>       1.value = NY
>>       2.label = AZ
>>       2.value = AZ
>>       20.selected = 1
>>     }
>>
>> 140.label = Postal Code:
>> 140.type= postal=input
>>
>> 150.label = Country:
>> 150.type= country=select
>> 150.required = 0
>>
>> 160.label = Comments:
>> 160.type= comments=textarea
>>
>>     500.type = submit=submit
>>     500.value = Submit
>>
>>   }
>> }
>>
>> # Now this is important too: We need to re-import our mailform back into 
>> the
>> # content.default class. The reason is that this class is normally being 
>> processed
>> # earlier, therefore we have to reimport it to make our changes to the 
>> default class work
>> tt_content.mailform.20  < temp.form
>>
>> #### End more info form 
> 
> 


More information about the TYPO3-english mailing list