Connecting Tech Pros Worldwide Help | Site Map

Email Form - post field as Subject

  #1  
Old July 20th, 2005, 04:06 PM
Susan
Guest
 
Posts: n/a
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:abc@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..
  #2  
Old July 20th, 2005, 04:06 PM
Shawn K. Quinn
Guest
 
Posts: n/a

re: Email Form - post field as Subject


In message <df57cf23.0306292102.33b189b2@posting.google.com > on Monday
June 30 2003 00:02, Susan wrote:
[color=blue]
> 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"[/color]

There is, if you're using a CGI program on the server which includes the
ability to do so.
[color=blue]
> current code:
>
> <!-- Start of FORM -->
> <form method="POST" action="mailto:abc@abc.com?subject=ABC Request"
> enctype="text/plain">[/color]

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
  #3  
Old July 20th, 2005, 04:07 PM
Susan
Guest
 
Posts: n/a

re: Email Form - post field as Subject


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



susanf9999@attbi.com (Susan) wrote in message news:<df57cf23.0306292102.33b189b2@posting.google. com>...[color=blue]
> 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:abc@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..[/color]
  #4  
Old July 20th, 2005, 04:07 PM
Tim
Guest
 
Posts: n/a

re: Email Form - post field as Subject


On 30 Jun 2003 17:48:57 -0700,
susanf9999@attbi.com (Susan) wrote:
[color=blue]
> 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 ?[/color]
[color=blue][color=green]
>> <form method="POST" action="mailto:abc@abc.com?subject=ABC Request" enctype="text/plain">[/color][/color]

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.
  #5  
Old July 20th, 2005, 04:07 PM
Mr. Clean
Guest
 
Posts: n/a

re: Email Form - post field as Subject


In article <df57cf23.0306301648.5c3cb1a4@posting.google.com >, susanf9999
@attbi.com says...[color=blue]
> 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 ?
>[/color]
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.
  #6  
Old July 20th, 2005, 04:07 PM
Susan
Guest
 
Posts: n/a

re: Email Form - post field as Subject


thank you - the javascript worked for me..



Mr. Clean <mrclean@protctorandgamble.com> wrote in message news:<MPG.196b544b86d52af09899e3@news-server.austin.rr.com>...[color=blue]
> In article <df57cf23.0306301648.5c3cb1a4@posting.google.com >, susanf9999
> @attbi.com says...[color=green]
> > 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 ?
> >[/color]
> 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.[/color]
  #7  
Old July 20th, 2005, 04:10 PM
Shawn K. Quinn
Guest
 
Posts: n/a

re: Email Form - post field as Subject


[quoting reordered]

In message <df57cf23.0307022027.35bae109@posting.google.com > on
Wednesday July 2 2003 23:27, Susan wrote:
[color=blue]
> Mr. Clean <mrclean@protctorandgamble.com> wrote in message
> news:<MPG.196b544b86d52af09899e3@news-server.austin.rr.com>...[color=green]
>> In article <df57cf23.0306301648.5c3cb1a4@posting.google.com >,
>> susanf9999 @attbi.com says...[color=darkred]
>> > 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 ?
>> >[/color]
>> 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.[/color]
>
> thank you - the javascript worked for me..[/color]

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

--
Shawn K. Quinn
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
email form using stationary colinod answers 0 August 15th, 2008 02:44 PM
help with email form alice answers 20 August 16th, 2007 03:05 PM
In email form how do we say "must be equal to X"? Matthew Wilson answers 12 November 14th, 2006 05:25 AM
How to get Outlook send email form from vb.net? Eric Peterson answers 2 November 20th, 2005 09:52 AM
Form field value into another form field? Larry answers 5 July 23rd, 2005 10:02 PM