forms field

  • Thread starter Thread starter clark smith
  • Start date Start date
C

clark smith

Frontpage 2000, I would like to include a comma or another
seperator along with the input of a form field. I'm not
sure how.
For example, a person inputs their name into a form field.
When they press submit, the email results would come
through as "personsname,"
I would only want the seperator to show up if data was
inputed into the form field.
I am using an asp page and cdonts for the forms handling.
 
-----Original Message-----
Frontpage 2000, I would like to include a comma or
another seperator along with the input of a form field.
I'm not sure how.
For example, a person inputs their name into a form
field.
When they press submit, the email results would come
through as "personsname," I would only want the seperator
to show up if data was inputed into the form field.
I am using an asp page and cdonts for the forms handling.

I suppose you're constructing the message body as a
string, and then setting your cdonts.newmail object's Body
property to that string. For example:

Dim objMail
Dim strBody

strBody = "This is the message."

Set objMail = CreateObject("CDONTS.Newmail")
objMail.Body = strBody

If you have a form field named personsname, you could code:

If Request("personsname") = "" then
strBody = ""
Else
strBody = "Dear " & Request("personsname") & _
"," & vbCrLf & vbCrlf
End If
strBNody = strBody & "This is the message."

The ampersand (&) operator joins two strings, and vbCrLf
is a built-in constant that equals a carri0age return and
a line feed.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*========----------
|\=========------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/=========------------
*========----------
 
Back
Top