Connecting Tech Pros Worldwide Help | Site Map

Email Form - post field as Subject

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 20th, 2005, 03:06 PM
Susan
Guest
 
Posts: n/a
Default 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: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, 03:06 PM
Shawn K. Quinn
Guest
 
Posts: n/a
Default 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, 03:07 PM
Susan
Guest
 
Posts: n/a
Default 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, 03:07 PM
Tim
Guest
 
Posts: n/a
Default 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, 03:07 PM
Mr. Clean
Guest
 
Posts: n/a
Default 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, 03:07 PM
Susan
Guest
 
Posts: n/a
Default 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, 03:10 PM
Shawn K. Quinn
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.