Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Form replys in order

Posted 18 Nov 2005 12:33:35
1
has voted
18 Nov 2005 12:33:35 Malcolm X posted:
Heya all. I have created 2 seperate forms which are linked together so that the information from form one goes to form2 when submitted. Once you complete form2 all of the info on form1 and form2 is submitted.

When I receive the completed forms by email, I receive all the info in a mess.

Eg.

Country
Family Name
Date of Birth
Address
Ocupation
Christian Name etc etc.

Where as the info should come through as

Christian Name
Family Name
Address
Country
Date of Birth
Ocupation

I have created these forms using DMWM04, ASP.

Can anyone suggest anything?

Thanks.

Malcolm R

Replies

Replied 18 Nov 2005 22:21:15
18 Nov 2005 22:21:15 Dave Thomas replied:
are you using CDONTS or similiar to send the form?

the order of the form elements is usually coded into the CDO or CDONTS part of the code

here is an old cdonts script i have, u can see where the body is coded to include the form parts.

<pre id=code><font face=courier size=2 id=code><font color=red>
&lt;%@LANGUAGE="VBSCRIPT"%&gt;
&lt;%
Response.Buffer = True

Dim strBody
Dim objCDOMail
Dim strMyEmailAddress
Dim strCCEmailAddress
Dim strBCCEmailAddress
Dim strReturnEmailAddress

strMyEmailAddress = " "
strCCEmailAddress = ""
strBCCEmailAddress = ""


'Read in the users e-mail address
strReturnEmailAddress = Request.Form("FEmail"


'Initialse strBody string with the body of the e-mail
strBody = "&lt;h3&gt;E-mail sent from Web Site&lt;/h3&gt;"
strBody = strBody & "&lt;br&gt;&lt;br&gt;This is a web form Email recieved from the website contact page."
strBody = strBody & "&lt;br&gt;&lt;br&gt;&lt;b&gt;Name: &lt;/b&gt;" & Request.Form("FName"
strBody = strBody & "&lt;br&gt;&lt;b&gt;Tel:&lt;/b&gt; " & Request.Form("FTel"
strBody = strBody & "&lt;br&gt;&lt;b&gt;Email:&lt;/b&gt; " & Request.Form("FEmail"
strBody = strBody & "&lt;hr&gt;"
strbody = strBody & "&lt;b&gt;Comments/Enquiry::&lt;/b&gt;&lt;br&gt;"
strBody = strBody & Replace(Request("FEnquiry", VbCrLf, "&lt;BR&gt;"
strBody = strBody & "&lt;br&gt;&lt;br&gt;"
strBody = strBody & "&lt;hr&gt;"
strBody = strBody & "Email script by David Thomas (Written in ASP/VBScript & using the CDONTs mail component)"


'Check to see if the user has entered an e-mail address and that it is a valid address otherwise set the e-mail address to your own otherwise the e-mail will be rejected
If Len(strReturnEmailAddress) &lt; 5 OR NOT Instr(1, strReturnEmailAddress, " " = 0 OR InStr(1, strReturnEmailAddress, "@", 1) &lt; 2 OR InStrRev(strReturnEmailAddress, "." &lt; InStr(1, strReturnEmailAddress, "@", 1) Then

'Set the return e-mail address to your own
strReturnEmailAddress = strMyEmailAddress
End If


'Send the e-mail

'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail"

'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objCDOMail.From = Request.Form("name" & " &lt;" & strReturnEmailAddress & "&gt;"

'Who the e-mail is sent to
objCDOMail.To = strMyEmailAddress

'Who the carbon copies are sent to
objCDOMail.Cc = strCCEmailAddress

'Who the blind copies are sent to
objCDOMail.Bcc = strBCCEmailAddress

'Set the subject of the e-mail
objCDOMail.Subject = "Some Info wanted"

'Set the e-mail body format (0=HTML 1=Text)
objCDOMail.BodyFormat = 0

'Set the mail format (0=MIME 1=Text)
objCDOMail.MailFormat = 0

'Set the main body of the e-mail
objCDOMail.Body = strBody

'Importance of the e-mail (0=Low, 1=Normal, 2=High)
objCDOMail.Importance = 1

'Send the e-mail
objCDOMail.Send

'Close the server object
Set objCDOMail = Nothing
%&gt;
</font id=red></font id=code></pre id=code>

regards

Dave Thomas
<b>DMX Zone Manager</b>

Reply to this topic