Die TYPO3 Mailingliste - nicht fragen: lesen!
This is a discussion on [TYPO3] FORM, defined using ts, not sending to email address within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; hi, required fields seem to be validating, but my Mailform simply reloads page but does not send.... any ideas? Thanks ...
|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
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 = | stdWrap.wrap= | recipient = junk (AT) avagraphique (DOT) 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 _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
------------
Andrew Davis _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
it seems that what I am doing here is also overwriting the standard
mailform somehow? Im trying to figure how to make my form send as an email... I thought I would just create a normal form cobject the normal way in backend, to see what it adds to the code, to rty to figure it out... but when I do that, even though the form cobject is the standard one inserted, it shows as my revised version. have I overwritten the default one? How can I revert to the default if needed? little worried here... Any help much appreciated, thanks! Andrew Davis Andrew Davis wrote: > 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 = | > stdWrap.wrap= | > recipient = junk (AT) avagraphique (DOT) 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 _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#4
|
|||
|
|||
|
Yes, it looks like i was overwriting that form, so i moved all this code
into the condition statement in the setup ts. So when im on the page that should have the changed form, it does the code.... Ok so now to figure out why not emailing! open to suggestions on that one! Thanks, Andrew Davis Andrew Davis wrote: > it seems that what I am doing here is also overwriting the standard > mailform somehow? > > Im trying to figure how to make my form send as an email... > > I thought I would just create a normal form cobject the normal way in > backend, to see what it adds to the code, to rty to figure it out... > > but when I do that, even though the form cobject is the standard one > inserted, it shows as my revised version. have I overwritten the default > one? > > How can I revert to the default if needed? > > little worried here... > > Any help much appreciated, thanks! > > Andrew Davis > > > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#5
|
|||
|
|||
|
>> it seems that what I am doing here is also overwriting the standard
>> mailform somehow? >> >> Im trying to figure how to make my form send as an email... >> >> I thought I would just create a normal form cobject the normal way in >> backend, to see what it adds to the code, to rty to figure it out... >> >> but when I do that, even though the form cobject is the standard one >> inserted, it shows as my revised version. have I overwritten the >> default one? >> >> How can I revert to the default if needed? > > Yes, it looks like i was overwriting that form, so i moved all this > code into the condition statement in the setup ts. So when im on the > page that should have the changed form, it does the code.... > > Ok so now to figure out why not emailing! > > open to suggestions on that one! Use the TypoScript Object Browser TSOB and tell me what you find here: tt_content + mailform + 20 + recipient field if you find anything there, ask yourself what this could mean for your form ;-) HTH Joey -- Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian openBC/Xing: http://www.cybercraft.de T3 cookbook: http://www.typo3experts.com _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#6
|
|||
|
|||
|
>
> Use the TypoScript Object Browser TSOB and tell me what you find here: > > tt_content > + mailform > + 20 > + recipient > field > > if you find anything there, ask yourself what this could mean for your form > ;-) > thank you for suggestion, but my typoscript is included from external file and does not seem to be showing up on the object browser.... I will try and place the ts into the template record instead of including it, and hopefully that will allow me to better troubleshoot. andrew _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#7
|
|||
|
|||
|
here it is, no clues that I can see............
[mailform]=COA [10]=< lib.stdheader [20]=FORM [formName]=mailform [layout]=<p>###LABEL### <br />###FIELD###</p> [labelWrap] [wrap]=| [fieldWrap] [commentWrap] [wrap]=| [radioWrap] [recipient]=junk (AT) avagraphique (DOT) com [stdWrap] [wrap]=| [params]=style="width:200px;" [REQ]=1 [labelWrap] [wrap]=<strong>| *</strong> [layout]=<p>###LABEL### <br />###FIELD###</p> [redirect]=94 [dataArray] andrew JoH asenau wrote: >>> it seems that what I am doing here is also overwriting the standard >>> mailform somehow? >>> >>> Im trying to figure how to make my form send as an email... >>> >>> I thought I would just create a normal form cobject the normal way in >>> backend, to see what it adds to the code, to rty to figure it out... >>> >>> but when I do that, even though the form cobject is the standard one >>> inserted, it shows as my revised version. have I overwritten the >>> default one? >>> >>> How can I revert to the default if needed? >> Yes, it looks like i was overwriting that form, so i moved all this >> code into the condition statement in the setup ts. So when im on the >> page that should have the changed form, it does the code.... >> >> Ok so now to figure out why not emailing! >> >> open to suggestions on that one! > > Use the TypoScript Object Browser TSOB and tell me what you find here: > > tt_content > + mailform > + 20 > + recipient > field > > if you find anything there, ask yourself what this could mean for your form > ;-) > > HTH > > Joey > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#8
|
|||
|
|||
|
>> Use the TypoScript Object Browser TSOB and tell me what you find
>> here: >> >> tt_content >> + mailform >> + 20 >> + recipient >> field >> >> if you find anything there, ask yourself what this could mean for >> your form ;-) >> > > thank you for suggestion, but my typoscript is included from external > file and does not seem to be showing up on the object browser.... I > will try and place the ts into the template record instead of > including it, and hopefully that will allow me to better troubleshoot. Your major problem might be that you are copying your new settings into the original element like that: tt_content.original < temp.mysettings this will leave any settings that you didn't provide in your temp.mysettings intact. So if there was something like tt_content.original.somesetting = somefield this will remain as is as long as you didn't override it with temp.mysettings.somesetting = somefield So if there was a recipient setting in the original mailform, taking the value from a DB field this will still be done, thus making the recipient you made in your temp setup disappear. Recipient is a special case, since there is a TS property for this special purpose, and this will override any settings from the data array. To get rid of the old settings you should always empty the original first. tt_content.original > tt_content.original < temp.mysettings HTH Joey -- Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian openBC/Xing: http://www.cybercraft.de T3 cookbook: http://www.typo3experts.com _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#9
|
|||
|
|||
|
> So if there was a recipient setting in the original mailform, taking
> the value from a DB field this will still be done, thus making the > recipient you made in your temp setup disappear. > Recipient is a special case, since there is a TS property for this > special purpose, and this will override any settings from the data > array. Well in this case it has been even more tricky, since you already set the correct property "recipient". But in the TS tree it is looking like this: recipient = junk (AT) avagraphique (DOT) com recipient.field = subheader So regardless of the value you assigned to recipient this will always be overriden by the .field property, trying to assign a value from the field tt_content.subheader. I guess this field is empty in your case, so you don't get any recipient. Still the solution is the same. First empty the section then copy your settings. tt_content.mailform > tt_content.mailform < temp.form HTH Joey -- Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian openBC/Xing: http://www.cybercraft.de T3 cookbook: http://www.typo3experts.com _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#10
|
|||
|
|||
|
i think i understand what is happening, but not sure why this is still
not working... At the end of my setup for the FORM, i insert tt_content.mailform.20 > tt_content.mailform.20 < temp.form and i get the same result (no mail sent). Note I tried your exact ts below ( tt_content.mailform > tt_content.mailform < temp.form ) but when I do that the form does not render at all (Subpart marker doesnt get replaced in the template) here is my ts (object browser screenshot). www.avagraphique.com/help/emailformts.pdf i setup a normal mailform and it sends ok, so i know it should be able to do so... Frustrated.....thanks for all help, Andrew Davis > > Well in this case it has been even more tricky, since you already set the > correct property "recipient". > > But in the TS tree it is looking like this: > > recipient = junk (AT) avagraphique (DOT) com > recipient.field = subheader > > So regardless of the value you assigned to recipient this will always be > overriden by the .field property, trying to assign a value from the field > tt_content.subheader. > I guess this field is empty in your case, so you don't get any recipient. > > Still the solution is the same. > First empty the section then copy your settings. > > tt_content.mailform > > tt_content.mailform < temp.form > > HTH > > Joey > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Themen-Optionen | Thema durchsuchen |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3] pass a variable to an email form | Andrew Davis | typo3-english@lists.netfielders.de | 7 | 05.06.2007 02:03 |
| [TYPO3] Eventdb and user-defined question | Svend-Erik Dejbjerg | typo3-english@lists.netfielders.de | 0 | 19.04.2007 16:30 |
| [TYPO3] Email validation in normal form | Jeppe Donslund | typo3-english@lists.netfielders.de | 2 | 18.04.2007 11:04 |
| [TYPO3] Top graphics defined by page and language... | Kristian Wind | typo3-english@lists.netfielders.de | 0 | 09.03.2007 11:20 |
| [TYPO3] tcdirectmail - problem sending newsletters | Jayne Eaton | typo3-english@lists.netfielders.de | 3 | 08.01.2007 10:34 |