469,650 Members | 1,704 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,650 developers. It's quick & easy.

Email Form - post field as Subject

Is there any way to take one of the fields from the form and use that
as your subject line.. right now I have a default subject line entered
- but would rather have the subject be the information the user has
typed into the field "store"

current code:

<!-- Start of FORM -->
<form method="POST" action="mailto:ab*@abc.com?subject=ABC Request"
enctype="text/plain">
<font size="5" face="Verdana"><b><center><sup>Dispatch Request
for</sup> <img src="logo.gif" width="197" height="60" alt=""
border="0" align=""></center></b></font>
<font size="2" face="Verdana"><center><b>Retail - (Inventory Customer
Number 59165)</b></center></font></center></font>
<br>

then further in the form I have a field "Store" that looks like:

<tr><!-- Row 6 -->
<td><font size="2" face="Verdana"><b>Store</b></font></td>
<td><input type="text"
name="Store"value=""cols="45"size="45"></td>
</tr>

this is the field I want as the subject matter of my email..

thank you for the help..
Jul 20 '05 #1
6 32375
In message <df**************************@posting.google.com > on Monday
June 30 2003 00:02, Susan wrote:
Is there any way to take one of the fields from the form and use that
as your subject line.. right now I have a default subject line entered
- but would rather have the subject be the information the user has
typed into the field "store"
There is, if you're using a CGI program on the server which includes the
ability to do so.
current code:

<!-- Start of FORM -->
<form method="POST" action="mailto:ab*@abc.com?subject=ABC Request"
enctype="text/plain">


What this form does is undefined according to the HTML 4.01
recommendation. You need to use the URL of a server-side CGI program in
order to make this work reliably. You have quite possibly lost many
submitted forms without even knowing it.

--
Shawn K. Quinn
Jul 20 '05 #2
The below has been working successfully for me - with confirmation
emails sent back to the user - is there a way that the user can type
in the subject then ?

thanks, Susan

su********@attbi.com (Susan) wrote in message news:<df**************************@posting.google. com>...
Is there any way to take one of the fields from the form and use that
as your subject line.. right now I have a default subject line entered
- but would rather have the subject be the information the user has
typed into the field "store"

current code:

<!-- Start of FORM -->
<form method="POST" action="mailto:ab*@abc.com?subject=ABC Request"
enctype="text/plain">
<font size="5" face="Verdana"><b><center><sup>Dispatch Request
for</sup> <img src="logo.gif" width="197" height="60" alt=""
border="0" align=""></center></b></font>
<font size="2" face="Verdana"><center><b>Retail - (Inventory Customer
Number 59165)</b></center></font></center></font>
<br>

then further in the form I have a field "Store" that looks like:

<tr><!-- Row 6 -->
<td><font size="2" face="Verdana"><b>Store</b></font></td>
<td><input type="text"
name="Store"value=""cols="45"size="45"></td>
</tr>

this is the field I want as the subject matter of my email..

thank you for the help..

Jul 20 '05 #3
Tim
On 30 Jun 2003 17:48:57 -0700,
su********@attbi.com (Susan) wrote:
The below has been working successfully for me - with confirmation
emails sent back to the user - is there a way that the user can type
in the subject then ?

<form method="POST" action="mailto:ab*@abc.com?subject=ABC Request" enctype="text/plain">


You're only noticing the successful ones, you won't ever get to find out
about the ones that fail. Using "mailto:" in a form action is
non-standard, with no defined behaviour (it won't, and doesn't, work for
all clients).

The solution, to both your problems, is to send to a script which
e-mails results (if you want them as e-mails), and has another text
entry gadget for participants to write in a subject line (though many
will not bother to do so - so you could pre-load it with something
useful to you).

i.e. Send data to the script, let the script send output to wherever you
need it.

--
My "from" address is totally fake. (Hint: If I wanted e-mails from
complete strangers, I'd have put a real one, there.) Reply to usenet
postings in the same place as you read the message you're replying to.
Jul 20 '05 #4
In article <df**************************@posting.google.com >, susanf9999
@attbi.com says...
The below has been working successfully for me - with confirmation
emails sent back to the user - is there a way that the user can type
in the subject then ?

If it is working for you and you want the user to type in a subject,
use javascript to submit the form and modify the URL using javascript
by reading the subject's input.
Jul 20 '05 #5
thank you - the javascript worked for me..

Mr. Clean <mr*****@protctorandgamble.com> wrote in message news:<MP************************@news-server.austin.rr.com>...
In article <df**************************@posting.google.com >, susanf9999
@attbi.com says...
The below has been working successfully for me - with confirmation
emails sent back to the user - is there a way that the user can type
in the subject then ?

If it is working for you and you want the user to type in a subject,
use javascript to submit the form and modify the URL using javascript
by reading the subject's input.

Jul 20 '05 #6
[quoting reordered]

In message <df**************************@posting.google.com > on
Wednesday July 2 2003 23:27, Susan wrote:
Mr. Clean <mr*****@protctorandgamble.com> wrote in message
news:<MP************************@news-server.austin.rr.com>...
In article <df**************************@posting.google.com >,
susanf9999 @attbi.com says...
> The below has been working successfully for me - with confirmation
> emails sent back to the user - is there a way that the user can
> type in the subject then ?
>

If it is working for you and you want the user to type in a subject,
use javascript to submit the form and modify the URL using javascript
by reading the subject's input.


thank you - the javascript worked for me..


Obviously you did not test with Javascript disabled. This is poor
practice for reasons that have been covered many times over.

--
Shawn K. Quinn
Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by | last post: by
8 posts views Thread by alice | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.