If you have a viewer that has form fields used by Javascript to compute a different field that you want in the hash table, there is a way to keep the original form fields from being added to the hash table. The only way to do this is to use Javascript to change all the field names that you do not want to be added to the work item properties to the empty string (" ") before you save or send a work item version.
For example:
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function changeName()
{
window.document.daForm.Address.value=
window.document.daForm.Address1.value + ",
" + window.document.daForm.Address2.value; window.document.daForm.Address1.name='';
window.document.daForm.Address2.name='';
}
function showName()
{
window.document.daForm.Address1.value=
window.document.daForm.Address1.name;
}
// -->
</script>
</head>
<body>
<form name="daForm" onsubmit="changeName();" action="http:// 127.0.0.1:8080/examples/jsp/snp/snoop.jsp">
<br></br>
<br></br>
<table>
<tbody>
<tr>
<td>Street</td>
<td>
<input id="one" type="text" name="Address1" value="Where do you live?"></input>
</td>
</tr>
<tr>
<td>City</td>
<td><input type="text" name="Address2" value=""></input>
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="Address" value=""></input>
<br></br>
<input type="submit" value="Click Me"></input>
</form>
</body>
</html>