Forum Moderators: open

Message Too Old, No Replies

how to: html form with multiple recipients

         

jeich182

4:37 pm on Aug 2, 2006 (gmt 0)

10+ Year Member



I'd like to take this simple form I've cobbled together and make it so I can select who the recipient is from a drop down menu or some such thing. Thanks in advance for your time. Here's my code:

<div id="main">
<div id="header">
<div class="left">
<p>Use the form below to submit Rework</p>
</div>
<div class="right">

<h2>IntrACC Rework Form</h2>

</div>
<div class="clearer">&nbsp;</div>
</div>
<div id="content" class="column">
<div class="sectionseparator">&nbsp;</div>

<form name="formname" method="post" action="mailto:person@example.com" enctype="text/plain">
<input type="hidden" name="" value="Rework">
<input type="hidden" name="product" value="ACC">

<div class="subcolumn1-2">
<label for="part_number">Part Number <sup>(required)</sup></label>
<input type="text" size="40" name="part_number" maxlength="50" class="full required">

<br><label for="invoice_number">Invoice Number <sup>(required)</sup></label>
<input type="text" size="40" name="invoice_number" maxlength="250" class="full required">
</div>
<div class="subcolumn2-2">
<label for="today's_date">Today's Date <sup>(required)</sup></label>
<input type="text" size="40" name="today's_date" maxlength="50" class="full required">

<br><label for="operator">operator <sup>(required)</sup></label>
<select name="Operator" class="full required">
<option value="">Select Operator:</option>
<option value="B. Soon">B. Soon</option>
<option value="R. Odon">R. Odon</option>
<option value="S. Ghatiey">S. Ghatiey</option>
<option value="J. Jackson">J. Jackson</option>
<option value="R. Moran">R. Moran</option>
<option value="S. Carbo">S. Carbo</option>
</select>
</div>
<div class="clearer">&nbsp;</div>
<label for="rework">Description of Rework <sup>(required)</sup></label>
<textarea name="rework" rows="15" cols="30" class="required"></textarea>
<div class="clearer">&nbsp;</div>

<div class="subcolumn1-2">
<label for="aware">Is your Supervisor aware of this problem?</label>
<select name="supervisor">
<option value="">Select:</option>
<option value="No">No</option>
<option value="Yes, EvH">Yes, EvH</option>
<option value="Yes, PT">Yes, PT</option>
<option value="Yes, NS">Yes, NS</option>
<option value="Yes, MG">Yes, MG</option>
<option value="Yes, Other">Yes, Other</option>

</select>
</div>
<div class="subcolumn2-2">
<label for="time">What is the total time this problem took?</label>
<select name="time">
<option value="">Select Time:</option>
<option value="5 min">5 min</option>
<option value="10 min">10 min</option>
<option value="15 min">15 min</option>
<option value="20 min">20 min</option>
<option value="25 min">25 min</option>
<option value="30 min">30 min</option>
<option value="40 min">40 min</option>
<option value="50 min">50 min</option>
<option value="1 hr">1 hr</option>
<option value="1 hr 10 min">1 hr 10 min</option>
<option value="1 hr 20 min">1 hr 20 min</option>
<option value="1 hr 30 min">1 hr 30 min</option>
<option value="1 hr 40 min">1 hr 40 min</option>
<option value="1 hr 50 min">1 hr 50 min</option>
<option value="2 hrs">2 hrs</option>
<option value="2.5 hrs">2.5 hrs</option>
<option value="3 hrs">3 hrs</option>
<option value="3.5 hrs">3.5 hrs</option>
<option value="4+ hrs">4+ hrs</option>

</select>
</div>
<div class="clearer">&nbsp;</div>
<div class="sectionseparator">&nbsp;</div>

<input type="image" src="http://images.apple.com/feedback/images/btn_submit_gray.gif" name="submit" alt="Send Feedback" width="203" height="27" border="0" value="Send Feedback" class="submit">
</form>
</div>

[edited by: tedster at 4:59 pm (utc) on Aug. 2, 2006]
[edit reason]
[1][edit reason] use example.com, not a real address [/edit]
[/edit][/1]

jeich182

5:17 pm on Aug 2, 2006 (gmt 0)

10+ Year Member



Thanks for the edit... I forgot about that.

encyclo

1:32 pm on Aug 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld jeich182!

The best way would be to use a server-side script (a "formmail" or similar) to send out to multiple addresses. Using the

mailto:
method is unreliable as it assumes that the end user has his email set up correctly, and for example they are not using a public machine and would prefer to use their web mail. Using a
mailto:
is also a sure-fire way to get a lot of spam.

What server-side technologies do you have available? Perl, PHP, ASP?

jeich182

2:27 pm on Aug 3, 2006 (gmt 0)

10+ Year Member



I'm really a newbie to this stuff. That said, I'm not sure what options I have available to me.
If it matters, this form will be used on my company intranet only.

encyclo

2:42 pm on Aug 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're on a company intranet, you're much safer because you know how the clients are set up and you don't have the spam problem.

If you stick with the

mailto:
method, you can try a few alternatives which are not standard, but may work. The first is to use a comma-separated list:

<form name="formname" method="post" action="mailto:person@example.com[b],anotherperson@example.com[/b]" enctype="text/plain">

Or a CC (carbon copy) for the second email address:

<form name="formname" method="post" action="mailto:person@example.com[b]?CC=anotherperson@example.com[/b]" enctype="text/plain">

A much better way yould be to ask the systems administrator to create an email alias which forwards the message to two multiple recipients - that way you only need to specify one email address.

jeich182

2:55 pm on Aug 3, 2006 (gmt 0)

10+ Year Member



Thank you for the tip(s). Do you know whether there's a way to specify one address out of several choices where the user could pick who the data goes to? Thanks for your time.

jeich182

1:08 pm on Aug 4, 2006 (gmt 0)

10+ Year Member



Now I have a new problem... My required fields stopped working (they worked before)

<div id="main">
<div id="header">
<div class="left">
<p>Use the form below to submit Rework</p>
</div>
<div class="right">

<h2>IntrACC Rework Form</h2>

</div>
<div class="clearer">&nbsp;</div>
</div>
<div id="content" class="column">
<div class="sectionseparator">&nbsp;</div>

<form name="formname" method="post" action="mailto:noone@nowhere.com" enctype="text/plain">
<input type="hidden" name="" value="Rework">
<input type="hidden" name="product" value="ACC">

<div class="subcolumn1-2">
<label for="Part_Number">Part Number <sup>(required)</sup></label>
<input type="text" size="40" name="Part_Number" maxlength="50" class="full required">

<br><label for="Invoice_Number">Invoice Number <sup>(required)</sup></label>
<input type="text" size="40" name="Invoice_Number" maxlength="250" class="full required">
</div>
<div class="subcolumn2-2">
<label for="Reject_Quantity">Reject Quantity <sup>(required)</sup></label>
<input type="text" size="40" name="Reject_Quantity" maxlength="50" class="full required">

<br><label for="Operator">Operator <sup>(required)</sup></label>
<select name="Operator" class="full required">
<option value="">Select Operator:</option>
<option value="B. Soon">B. Soon</option>
<option value="R. Odon">R. Odon</option>
<option value="S. Ghatiey">S. Ghatiey</option>
<option value="J. Jackson">J. Jackson</option>
<option value="R. Moran">R. Moran</option>
<option value="S. Carbo">S. Carbo</option>
</select>
</div>
<div class="clearer">&nbsp;</div>
<label for="Rework">Description of Rework <sup>(required)</sup></label>
<textarea name="Rework" rows="15" cols="30" class="required"></textarea>
<div class="clearer">&nbsp;</div>

<div class="subcolumn1-2">
<label for="Supervisor">Is your Supervisor aware of this problem?</label>
<select name="Supervisor">
<option value="">Select:</option>
<option value="No">No</option>
<option value="Yes, EvH">Yes, EvH</option>
<option value="Yes, PT">Yes, PT</option>
<option value="Yes, NS">Yes, NS</option>
<option value="Yes, MG">Yes, MG</option>
<option value="Yes, Other">Yes, Other</option>

</select>
</div>
<div class="subcolumn2-2">
<label for="Time">What is the total time this problem took?</label>
<select name="Time">
<option value="">Select Time:</option>
<option value="5 min">5 min</option>
<option value="10 min">10 min</option>
<option value="15 min">15 min</option>
<option value="20 min">20 min</option>
<option value="25 min">25 min</option>
<option value="30 min">30 min</option>
<option value="40 min">40 min</option>
<option value="50 min">50 min</option>
<option value="1 hr">1 hr</option>
<option value="1 hr 10 min">1 hr 10 min</option>
<option value="1 hr 20 min">1 hr 20 min</option>
<option value="1 hr 30 min">1 hr 30 min</option>
<option value="1 hr 40 min">1 hr 40 min</option>
<option value="1 hr 50 min">1 hr 50 min</option>
<option value="2 hrs">2 hrs</option>
<option value="2.5 hrs">2.5 hrs</option>
<option value="3 hrs">3 hrs</option>
<option value="3.5 hrs">3.5 hrs</option>
<option value="4+ hrs">4+ hrs</option>

</select>
</div>
<div class="clearer">&nbsp;</div>
<div class="sectionseparator">&nbsp;</div>

<INPUT TYPE="SUBMIT" NAME="button2" VALUE="Submit"><INPUT TYPE="RESET" NAME="button1" VALUE="Reset Form">
</form>
</div>

Any thoughts?