#set $ml = $melati.HTMLMarkupLanguage
$melati.setVariableExceptionHandler($melati.PassbackVariableExceptionHandler)
#set $melati.ResponseContentType = "text/html"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
  <title>Edit/Amend a Contact</title>
</head>
<SCRIPT src="$melati.JavascriptLibraryURL/validation.js"></SCRIPT>

<body bgcolor="#ffffff">
<h1>
#if ($contact.Troid) #begin
Edit
#end #else #begin
Insert
#end
Contact</h1>
<form method=post action=Update>
<table>
#foreach $field in $contact.RecordDisplayFields #begin
#if ($field.UserEditable) #begin
      <TR>
        <TD>
          $ml.rendered($field.Name)</TD><TD> $ml.input($field)
        </TD>
      </TR>
#end
#end
#if ($categories.hasMoreElements()) #begin
    #foreach $category in $categories #begin
      <TR>
        <TD>$ml.rendered($category.Name)</TD>
        <TD><INPUT TYPE=checkbox name=field_category value=$category.Troid
	  #if ($contact.isIn($category)) #begin 
	        CHECKED
      #end
	>
        </TD></TR>
	#end
#end
      <TR>
        <TD colspan=2 align=center>
         <input type=submit name=update value=update 
                ONCLICK="return validate(this.form);">
        </TD>
      </TR>
</form>
      <TR>
        <TD colspan=2 align=center>
         <a href=Delete>Delete</a>
        </TD>
      </TR>
</table>
</body>
</html>








