I've built a HTML form that will be used for several internal users.
I have pasted the HTML code for the form below. I need this form to:
- On
the form, I need to have a way for user's to enter a user ID and
password and have that validated. I'm not sure how to do this or how to
setup/maintain the user list.
- Generate a unique confirmation # after user submits and display this number on web page following submission.
- On
the same page the follows the submission, I want the user's responses
from the form to be referenced in a summary statement. For example:
#username submission request #uniqueIDnumber has been received on
#date&time. We will #documenttype contractor #contractorcode in the
amount of #dollarvalue in reference to work order #workorder. The
reason is #reasoncode and the department is #department. Addional
comments for #documenttype #Ifselected8reasonabo.
- I want
all submitted data to be entered into a MS Access DB. It can all go to
a single table. Fields: Username, Date, Time, Unique confirmation #,
document type, contractor code, dollar value, work order, reason code,
department #, ifselected8reasonabo.
I tried building an
ASP file for this, but it didn't seem to work. My ASP skills are VERY
weak, so any help provided will be greatly appreciated.
<script src="http://www.jotform.com/js/form.js?v2.0.1165" type="text/javascript"></script>
<style type="text/css">
.tbmain{
/* Changes on the form */
background: #D7E9F3 !important;
}
.left{
/* Changes on the form */
color: #394F5F !important;
font-family: Verdana !important;
font-size: 13px !important;
}
td.left {
font-family: Tahoma;
font-size: 11px;
font-weight:bold;
color:#394F5F;
vertical-align: top;
text-align: left;
}
.pagebreak{
font-family: Tahoma;
font-size: 11px;
font-weight:bold;
color:black;
}
td.right {
font-family: Tahoma;
font-size: 11px;
font-weight: normal;
color:#394F5F;
vertical-align: top;
text-align: left;
}
.tbmain{
height:100%;
color:#394F5F;
background: #D7E9F3;
}
.head{
font-family: Tahoma;
font-size:medium;
font-weight:bold;
color:#394F5F;
vertical-align: top;
text-align: left;
}
.notvalid{
border:2px red solid;
font-family:Tahoma;
}
.text{
color:#394F5F;
font-family: Tahoma;
font-size: 11px;
font-weight:normal;
border:0px;
background:#ABCADB;
}
select.other{
color:#394F5F;
font-family: Tahoma;
font-size: 11px;
font-weight:normal;
border:0px;
background:#ABCADB;
}
.btn{
color:#ffffff;
font-family: Tahoma;
font-size: 11px;
font-weight:bold;
border:1px #8aaabc solid;
background: url(http://www.jotform.com/images/styles/style5_btn_bg.gif) #9bbed0 top repeat-x;
}
span.required{
font-size: 13px !important;
color: red !important;
}
div.backButton{
background: transparent url("http://www.jotform.com//images/btn_back.gif") no-repeat scroll 0 0;
height:16px;
width:53px;
float:left;
margin-bottom:15px;
padding-right:5px;
}
div.backButton:hover{
background: transparent url("http://www.jotform.com//images/btn_back_over.gif") no-repeat scroll 0 0;
}
div.backButton:active{
background: transparent url("http://www.jotform.com//images/btn_back_down.gif") no-repeat scroll 0 0;
}
div.nextButton{
background: transparent url("http://www.jotform.com//images/btn_next.gif") no-repeat scroll 0 0;
height:16px;
width:53px;
float: left;
margin-bottom:15px;
padding-right:5px;
}
div.nextButton:hover{
background: transparent url("http://www.jotform.com//images/btn_next_over.gif") no-repeat scroll 0 0;
}
div.nextButton:active{
background: transparent url("http://www.jotform.com//images/btn_next_down.gif") no-repeat scroll 0 0;
}
.pageinfo{
padding-right:5px;
margin-bottom:15px;
float:left;
}
</style>
<table width="100%" cellpadding="2" cellspacing="0" class="tbmain">
<tr><td class="topleft" width="10" height="10"> </td>
<td class="topmid"> </td>
<td class="topright" width="10" height="10"> </td>
</tr>
<tr>
<td class="midleft" width="10"> </td>
<td class="midmid" valign="top">
<form accept-charset="utf-8" action="add_to_database.asp" method="post" name="Chargeback">
<input type="hidden" name="formID" value="92951117169" />
<div id="main">
<div class="pagebreak">
<table width="520" cellpadding="5" cellspacing="0">
<tr >
<td colspan="2" align='left'>
</td>
</tr>
<tr >
<td colspan="2" >
<div style="text-align: center;"><font size="5"><span style="font-family: Verdana;">Chargeback Request Form</span></font><br></div>
</td>
</tr>
<tr >
<td width="150" class="left" >
<label >User Name <span class="required">*</span></label>
</td>
<td class="right" >
<input type="text" size="20" name="UserName" class="text" value="" id="q19" onblur="validate(this,'Required')" maxlength="100" maxsize="100" />
</td>
</tr>
<tr >
<td width="150" class="left" >
<label >Work order # <span class="required">*</span></label>
</td>
<td class="right" >
<input type="text" size="20" name="Workorder" class="text" value="" id="q8" onblur="validate(this,'RequiredNumeric')" maxlength="100" maxsize="100" />
</td>
</tr>
<tr >
<td width="150" class="left" >
<label >Contractor code <span class="required">*</span></label>
</td>
<td class="right" >
<input type="text" size="20" name="Contractorcode" class="text" value="" id="q14" onblur="validate(this,'Required')" maxlength="100" maxsize="100" />
</td>
</tr>
<tr >
<td width="150" class="left" valign="top" >
<label>Document type <span class="required">*</span></label>
</td>
<td class="right">
<select class="other" name="Documenttype" id="q10" onblur="validate(this,'Required')" >
<option></option>
<option>Chargeback</option>
<option>Pay Additional</option>
<option>Chargeback Reversal</option>
</select>
</td>
</tr>
<tr >
<td width="150" class="left" >
<label >Dollar amount <span class="required">*</span></label>
</td>
<td class="right" >
<input type="text" size="20" name="Dollaramount" class="text" value="" id="q16" onblur="validate(this,'RequiredNumeric')" maxlength="100" maxsize="100" />
</td>
</tr>
<tr >
<td width="150" class="left" valign="top" >
<label>Reason code <span class="required">*</span></label>
</td>
<td class="right">
<select class="other" name="Reasoncode" id="q9" onblur="validate(this,'Required')" >
<option></option>
<option>1 - Reassigned due to non-performance</option>
<option>2 - Not done per guidelines</option>
<option>3 - No photos to support work</option>
<option>4 - Poor quality photos</option>
<option>5 - Invoiced Late</option>
<option>6 - Incorrect Occupancy</option>
<option>7 - Done at wrong property</option>
<option>8 - Other (need description below)</option>
</select>
</td>
</tr>
<tr >
<td width="150" class="left" valign="top" >
<label>If selected #8 reason above, please describe reason(s)</label>
</td>
<td class="right" >
<textarea cols="40" rows="2" name="Ifselected8reasonabo" class="text" id="q11" ></textarea>
</td>
</tr>
<tr >
<td width="150" class="left" valign="top" >
<label>Department <span class="required">*</span></label>
</td>
<td class="right">
<select class="other" name="Department" id="q18" onblur="validate(this,'Required')" >
<option></option>
<option>1 - Inspections</option>
<option>2 - P&P Maintenance</option>
<option>3 - Appraisals</option>
<option>4 - BPO's</option>
<option>5 - Insurance Loss</option>
<option>6 - P&P Grass</option>
<option>7 - Title</option>
<option>8 - Haz Claims</option>
<option>10 - REO Maint</option>
<option>11 - REO Grass</option>
</select>
</td>
</tr>
<tr >
<td width="150" class="left" >
</td>
<td class="right">
<input type="submit" value="Submit details" name="Submit">
</td>
</tr>
</table>
</div>
</div>
</form>
</td>
<td class="midright" width="10"> </td>
</tr>
<tr>
<td class="bottomleft" width="10" height="10"> </td>
<td class="bottommid"> </td>
<td class="bottomright" width="10" height="10"> </td>
</tr>
</table>
<script type="text/javascript">
validate("q_form_92951117169");
</script>