End of Template When Expecting END IF Errors

From HotDocs Wiki

Jump to: navigation, search

Problem

When you assemble a template, you receive the error message, "Found the end of the template when expecting an END IF instruction."

Solution

Several things may cause this error:

  • An END IF instruction may be missing from the template.
  • An END IF instruction may be missing an end chevron.
  • An end chevron on an END IF instruction may be in a different font than the rest of the instruction.
  • An IF instruction may be inside a table of contents code. In this situation, the IF instruction is pulled into the table of contents without the matching END IF instruction.
  • An IF instruction may be inside a table. HotDocs doesn't allow IF instructions directly in a table, although you can place the IF instruction within a Computation variable in the table.

To resolve these errors, you must review the template and locate the IF instruction that is causing the problem. If you are using templates provided by another source, then contact your template provider with information about the error.