Timestamping with One Memo Field
You can implement timestamping with just one memo field. To do this, use the HTML code before control attribute to insert a text area control above the timestamp log field. This text area control is not tied to any database field. It exists only to allow input, which is copied into the timestamp log field when you save the issue. The advantage to this approach is that you avoid storing an extra memo field in the issue database. The disadvantage is that you cannot use HelpDesk Admin or the Web View Editor to customize the input text area (for example, to change the caption or position of the control).
Html code after control:
<script type='text/javascript'>
document.write(parent.objCustomCode.getCodeAfterField('%fieldname%',''));
</script>
Html code before control:
<script type='text/javascript'>
document.write(parent.objCustomCode.getInputMemoField('mem_desc', '%fieldname%'));
</script>
New function in CustomCode.js:
function getInputMemoField( inputFld, logFld )
{
var strOutput;
strOutput="<textarea class='MemoFieldWidth' ";
strOutput+="name='" + inputFld + "' ";
strOutput+="wrap=physical rows=10 cols=73";
strOutput+="onfocus=\"parent.MemoGotFocus('"
+ inputFld + "')\" ";
strOutput+="onchange=\"parent.OnMemoRecordChanged('" + inputFld + "')\" ";
strOutput+="onkeypress=\"parent.OnMemoRecordChanged('" + inputFld +"')\"></textarea><br>";
strOutput+="<script type='text/javascript'>";
strOutput+="document.write(parent.objCustomCode.getCodeAfterField('" + inputFld + "','" +logFld + "'))</script>";
strOutput+="</script>";
return strOutput;
}
New declaration in CustomCode.js:
// Declaration of the public functions
this.getInputMemoField=getInputMemoField;
Related Topics