The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Generating email from completed form
Beric
post Nov 11 2014, 04:30 PM
Post #1





Group: Members
Posts: 1
Joined: 11-November 14
Member No.: 21,797



Hi all, hope someone can help me here. I have generated a form compliments of a website however I want the form to submit to a blank email within outlook. The address and subject will be manually filled in by the sender. This will all run locally from each persons machine.

the code is below and also attached (Apologies if I am not supposed to post this here)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ITSM Manual Incident Logging Form</title>
<link rel="stylesheet" type="text/css" href="./colors/color23/view.css" media="all">
<script type="text/javascript" src="js/view.js"></script>
<script type="text/javascript" src="js/calendar.js"></script>
</head>
<body id="main_body" >

<img id="top" src="images/top.png" alt="">
<div id="form_container">

<h1><a>ITSM Manual Incident Logging Form</a></h1>
<form id="form_929030" class="appnitro" method="post" action="/formbuilder/view.php">
<div class="form_description">
<h2>ITSM Manual Incident Logging Form</h2>
<p>Please complete all fields</p>
</div>
<ul >

<li id="li_1" >
<label class="description" for="element_1">Analyst Name </label>
<span>
<input id="element_1_1" name= "element_1_1" class="element text" maxlength="255" size="8" value=""/>
<label>First</label>
</span>
<span>
<input id="element_1_2" name= "element_1_2" class="element text" maxlength="255" size="14" value=""/>
<label>Last</label>
</span>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_2" >
<label class="description" for="element_2">Temporary Reference </label>
<div>
<input id="element_2" name="element_2" class="element text small" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_3" >
<label class="description" for="element_3">Login ID </label>
<div>
<input id="element_3" name="element_3" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_4" >
<label class="description" for="element_4">Customer Name </label>
<span>
<input id="element_4_1" name="element_4_1" class="element text" maxlength="255" size="2" value=""/>
<label>Title</label>
</span>
<span>
<input id="element_4_2" name="element_4_2" class="element text" maxlength="255" size="8" value=""/>
<label class="tam">First</label>
</span>
<span>
<input id="element_4_3" name="element_4_3" class="element text" maxlength="255" size="14" value=""/>
<label class="tam">Last</label>
</span>
<span>
<input id="element_4_4" name="element_4_4" class="element text" maxlength="255" size="3" value=""/>
<label>Suffix</label>
</span>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_5" >
<label class="description" for="element_5">Telephone Number </label>
<div>
<input id="element_5" name="element_5" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_6" >
<label class="description" for="element_6">Location </label>
<div>
<input id="element_6" name="element_6" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_7" >
<label class="description" for="element_7">ITSM Entry by </label>
<div>
<input id="element_7" name="element_7" class="element text small" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_8" >
<label class="description" for="element_8">Contact Name </label>
<span>
<input id="element_8_1" name= "element_8_1" class="element text" maxlength="255" size="8" value=""/>
<label>First</label>
</span>
<span>
<input id="element_8_2" name= "element_8_2" class="element text" maxlength="255" size="14" value=""/>
<label>Last</label>
</span>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_9" >
<label class="description" for="element_9">Contact Telephone Number </label>
<div>
<input id="element_9" name="element_9" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_10" >
<label class="description" for="element_10">Email </label>
<div>
<input id="element_10" name="element_10" class="element text large" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_19" >
<label class="description" for="element_19">Preferred Contact Method </label>
<div>
<select class="element select small" id="element_19" name="element_19">
<option value="" selected="selected"></option>
<option value="1" >Select</option>
<option value="2" >Telephone</option>
<option value="3" >Email</option>

</select>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_11" >
<label class="description" for="element_11">Asset Number </label>
<div>
<input id="element_11" name="element_11" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_12" >
<label class="description" for="element_12">Time of Call </label>
<span>
<input id="element_12_1" name="element_12_1" class="element text " size="2" type="text" maxlength="2" value=""/> :
<label>HH</label>
</span>
<span>
<input id="element_12_2" name="element_12_2" class="element text " size="2" type="text" maxlength="2" value=""/> :
<label>MM</label>
</span>
<span>
<input id="element_12_3" name="element_12_3" class="element text " size="2" type="text" maxlength="2" value=""/>
<label>SS</label>
</span>
<span>
<select class="element select" style="width:4em" id="element_12_4" name="element_12_4">
<option value="AM" >AM</option>
<option value="PM" >PM</option>
</select>
<label>AM/PM</label>
</span>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_13" >
<label class="description" for="element_13">Reported Source </label>
<div>
<input id="element_13" name="element_13" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_20" >
<label class="description" for="element_20">Priority </label>
<div>
<select class="element select small" id="element_20" name="element_20">
<option value="" selected="selected"></option>
<option value="1" >Select</option>
<option value="2" >1</option>
<option value="3" >2</option>
<option value="4" >3</option>
<option value="5" >4</option>
<option value="6" >5</option>

</select>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_14" >
<label class="description" for="element_14">Status </label>
<div>
<input id="element_14" name="element_14" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_15" >
<label class="description" for="element_15">Summary (SNAP) </label>
<div>
<input id="element_15" name="element_15" class="element text large" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_16" >
<label class="description" for="element_16">Assigned to </label>
<span>
<input id="element_16_1" name= "element_16_1" class="element text" maxlength="255" size="8" value=""/>
<label>First</label>
</span>
<span>
<input id="element_16_2" name= "element_16_2" class="element text" maxlength="255" size="14" value=""/>
<label>Last</label>
</span>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_17" >
<label class="description" for="element_17">Details and Diagnostics </label>
<div>
<textarea id="element_17" name="element_17" class="element textarea large"></textarea>
</div>
</li> <li class="section_break">
<h3></h3>
<p></p>
</li> <li id="li_18" >
<label class="description" for="element_18">Work Info and Resolution </label>
<div>
<textarea id="element_18" name="element_18" class="element textarea large"></textarea>
</div>
</li>

<li class="buttons">
<input type="hidden" name="form_id" value="929030" />

<input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
</li>
</ul>
</form>
<div id="footer">
Generated by <a href="http://www.phpform.org">pForm</a>
</div>
</div>
<img id="bottom" src="images/bottom.png" alt="">
</body>
</html>


Attached File(s)
Attached File  form__1_.zip ( 7.84k ) Number of downloads: 68
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 11 2014, 11:44 PM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,628
Joined: 9-August 06
Member No.: 6



You can use mailto.
http://htmlhelp.com/reference/html40/forms/form.html

We usually advice against mailto since it's unreliable, but it sounds like it's a controlled group that will be using this form, i.e. you know what they all have an email client and so on.

The complete syntax for mailto is as below.
CODE
mailto:joe@example.com?cc=jill@example.com&subject=This%20and%20that&Body=Blah%20blah%20blah


You can use the parameters you want. For a form that would normally be mailto:joe@example.com?subject=This%20and%20that . So you would end up with just this. You do need enctype as well.

CODE
<form action="mailto:" enctype="text/plain" method="post">


Problem is, I'm not sure if it's OK to exclude the primary email address. The modern browsers I have are fine with it, but my old version of IE is not. Some browser also enter their own subject if you don't use that parameter, for example "Form Post from Firefox", so maybe you are better off actually using both an email address and a subject and encourage your users to change them.

CODE
<form action="mailto:EMAIL@EXAMPLE.COM?subject=ENTER%20YOUR%20SUBJECT%20HERE" enctype="text/plain" method="post">


Note that you need to URL encode any spaces in the subject line, i.e. escape them with %20. That goes for body as well if you some other time use an amail link with body text in the mailto line.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 31st March 2020 - 05:29 AM