473,466 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Form on Web Page By Email

Hello All

I have a web page which has a registration form. The user inputs data in the
form and I would like to be able to send the entire form contents to an
email address (In the HTML format). What is the best and easiest method to
do this? Do I have to capture each element of the form and string it to the
body and then send it out in the page or is there any faster way to grab the
entire contents of the form entirely and attach to the body?

Thanks
Jul 22 '05 #1
4 1459
One of the easiest (though not necessarily best) methods to do this, is to
change the action attribute to "mailto:theEmailAddressHere", method= "post"
enctype="text/plain". However, this will give a resulting email of
name_of_the_form_element=value_of_element. For example:
name=A Name
sex=M
income=Under $25000
Where the name was a text field, sex was a radio button, and income was a
select box. If this seems good enough, I would also suggest throwing in a
Javascript alert window (or something) to let the users know that something
just happened.
Hope that helps

"Rahul Chatterjee" wrote:
Hello All

I have a web page which has a registration form. The user inputs data in the
form and I would like to be able to send the entire form contents to an
email address (In the HTML format). What is the best and easiest method to
do this? Do I have to capture each element of the form and string it to the
body and then send it out in the page or is there any faster way to grab the
entire contents of the form entirely and attach to the body?

Thanks

Jul 22 '05 #2
Gazing into my crystal ball I observed "Rahul Chatterjee"
<ra***@benesysinc.com> writing in
news:O6**************@TK2MSFTNGP12.phx.gbl:
Hello All

I have a web page which has a registration form. The user inputs data
in the form and I would like to be able to send the entire form
contents to an email address (In the HTML format). What is the best and
easiest method to do this? Do I have to capture each element of the
form and string it to the body and then send it out in the page or is
there any faster way to grab the entire contents of the form entirely
and attach to the body?

Thanks


<%

msg = "<body>"
msg = msg & "<p>Here is the contents of your form:</p>"
msg = msg & "<ul>"
For ix = 1 to Request.Form.Count
field = Request.Form.Key(ix)
InputValue = Request.Form.Item(ix)
msg = msg & "<li>" & field & ": " & InputValue & "</li>"
Next
msg = msg & "</ul>"
msg = msg & "</body>"

'do whatever else you need to do to send mail
%>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #3
This looks good - quick and simple. Is there any way to get the output to
come out in HTML format
"Tyler@Thomson" <Ty**********@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
One of the easiest (though not necessarily best) methods to do this, is to
change the action attribute to "mailto:theEmailAddressHere", method= "post" enctype="text/plain". However, this will give a resulting email of
name_of_the_form_element=value_of_element. For example:
name=A Name
sex=M
income=Under $25000
Where the name was a text field, sex was a radio button, and income was a
select box. If this seems good enough, I would also suggest throwing in a
Javascript alert window (or something) to let the users know that something just happened.
Hope that helps

"Rahul Chatterjee" wrote:
Hello All

I have a web page which has a registration form. The user inputs data in the form and I would like to be able to send the entire form contents to an
email address (In the HTML format). What is the best and easiest method to do this? Do I have to capture each element of the form and string it to the body and then send it out in the page or is there any faster way to grab the entire contents of the form entirely and attach to the body?

Thanks

Jul 22 '05 #4
Gazing into my crystal ball I observed "Rahul Chatterjee"
<ra***@benesysinc.com> writing in
news:#h**************@TK2MSFTNGP10.phx.gbl:
This looks good - quick and simple. Is there any way to get the output
to come out in HTML format
It may look good and simple, but A) it will not be in HTML, content type
for HTML is text/HTML, B) it depends on the user having an email client, so
it will not work for persons who are using web based email, like someone at
an Internet Cafe, the library, someone else's office, etc., C) if the user
does have an email client, the client may still have issues.
"Tyler@Thomson" <Ty**********@discussions.microsoft.com> wrote in
message news:2E**********************************@microsof t.com...
One of the easiest (though not necessarily best) methods to do this,
is to change the action attribute to "mailto:theEmailAddressHere",
method= "post" enctype="text/plain". However, this will give a
resulting email of name_of_the_form_element=value_of_element. For
example: name=A Name
sex=M
income=Under $25000
Where the name was a text field, sex was a radio button, and income
was a select box. If this seems good enough, I would also suggest
throwing in a Javascript alert window (or something) to let the users
know that something just happened.
Hope that helps

"Rahul Chatterjee" wrote:
> Hello All
>
> I have a web page which has a registration form. The user inputs
> data in the form and I would like to be able to send the entire form
> contents to an email address (In the HTML format). What is the best
> and easiest method to do this? Do I have to capture each element of
> the form and string it to the body and then send it out in the page
> or is there any faster way to grab the entire contents of the form
> entirely and attach to the body?
>
> Thanks
>
>
>



--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Roger Price | last post by:
Thank you to Yang (Is that your first name?) and Andy for your suggestions. I am 99% of the way there but now cannot get the "Reset" button to work. I have included the whole of my code and...
5
by: Newbee | last post by:
Hi, I would like to have form with Tab Control with 3 pages. Each page in tab control would contain text boxes from different sources (tables). On first page would be text boxes from tblOne,...
3
by: raj chahal | last post by:
Hi there i have created a registration page containing a form than sends username password to an asp processing page. If the user exists it sends the user back to the registration page with...
13
by: deko | last post by:
I have a basic feedback form with a submit button. After the "send" button is clicked, I want the user to be redirected to a different page that says "Your message has been sent." How do I do...
7
by: h7qvnk7q001 | last post by:
I'm trying to implement a simple server-side form validation (No Javascript). If the user submits a form with errors, I want to redisplay the same form with the errors highlighted. Once the form...
16
by: whyyyy | last post by:
The script below works fine if the form is filled out and submitted. But a (blank) e-mail is sent whenever the page loads, even when the form is not submitted. I would like to receive the e-mail...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
1
by: ColebyA | last post by:
Hi I am using ASP and HTML to process a form. The first form calls another page to process the data. When the page processes it redirects to a page confirming submission. I want to display the...
24
by: jerrydigital | last post by:
Hello, I am new to this forum but have read several posts and I thank you for your great assistance. I am stumped right now. I have a user registration form in asp that is set to a form...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.