Hi ALL
We are trying to validate a form on submit. I want to check all of the input fields to make sure at least one of them has been changed. This will avoid the query extracting ALL recordes from the table.
Below is the form code I am using. Can anyone provide the code to do this validation? The four input field names are asc_order_cd, site_number, surveyorone, proj_code and factual_key as shown in the code below.
<form name="" method="post" action="testtwo.cfm">
<table width="673" border="0" height="179">
<tr>
<td>ASC:</td>
<td>
<select name="asc_order_cd">
<option value="allasc" selected>(All Asc)
<cfoutput query="order">
<option value="#code# ">#code# |#description#
</cfoutput>
</select>
</td>
</tr>
<tr>
<td>Site Number:</td>
<td>
<input type="text" name="site_number">
</td>
</tr>
<tr>
<td>Surveyor One:</td>
<td>
<select name="surveyorone">
<option value="allsurveyor" selected>(All Surveyors)
<cfoutput query="sureone">
<option value="#surveyor_code# ">#surveyor_code# | #surveyor_last_name#
</cfoutput>
</select>
</td>
</tr>
<tr>
<td>Project Code:</td>
<td>
<select name="proj_code">
<option value="allprojects" selected>(All Projects)
<cfoutput query="projectcode">
<option value="#project_code# ">#project_code# | #project_title#
</cfoutput>
</select>
</td>
</tr>
<tr>
<td>Factual Key:</td>
<td>
<select name="factual_key">
<option value="allfactualkey" selected>(All Factual Keys)
<cfoutput query="factualkey">
<option value=" #code# ">#code# |#description#
</cfoutput>
</select>
</td>
</tr>
</table>
<p>
<input type="submit" value="Find a matching soil">
</p>
</form>
We are trying to validate a form on submit. I want to check all of the input fields to make sure at least one of them has been changed. This will avoid the query extracting ALL recordes from the table.
Below is the form code I am using. Can anyone provide the code to do this validation? The four input field names are asc_order_cd, site_number, surveyorone, proj_code and factual_key as shown in the code below.
<form name="" method="post" action="testtwo.cfm">
<table width="673" border="0" height="179">
<tr>
<td>ASC:</td>
<td>
<select name="asc_order_cd">
<option value="allasc" selected>(All Asc)
<cfoutput query="order">
<option value="#code# ">#code# |#description#
</cfoutput>
</select>
</td>
</tr>
<tr>
<td>Site Number:</td>
<td>
<input type="text" name="site_number">
</td>
</tr>
<tr>
<td>Surveyor One:</td>
<td>
<select name="surveyorone">
<option value="allsurveyor" selected>(All Surveyors)
<cfoutput query="sureone">
<option value="#surveyor_code# ">#surveyor_code# | #surveyor_last_name#
</cfoutput>
</select>
</td>
</tr>
<tr>
<td>Project Code:</td>
<td>
<select name="proj_code">
<option value="allprojects" selected>(All Projects)
<cfoutput query="projectcode">
<option value="#project_code# ">#project_code# | #project_title#
</cfoutput>
</select>
</td>
</tr>
<tr>
<td>Factual Key:</td>
<td>
<select name="factual_key">
<option value="allfactualkey" selected>(All Factual Keys)
<cfoutput query="factualkey">
<option value=" #code# ">#code# |#description#
</cfoutput>
</select>
</td>
</tr>
</table>
<p>
<input type="submit" value="Find a matching soil">
</p>
</form>