How to prepare a template for docusuit_

Template management stands behind the core of docusuit_

In order to generate a web form out of a template, and eventually a final document that incorporates the data fulfilled by the users, we need to prepare the corresponding document template for its parsing by docusuit_.

This template preprocessing is quite simple and does not require the intervention of highly specialized personnel. Nevertheless a little training is needed.

Before getting into the nitty-gritty details, let us work out a very simple example that will illustrate the general procedure.

Let us assume that we have this very simple Word document (example document), which contents we include now for convenience:

This Contract is entered into by and between ________________, (“First Party”), and ________________, (“Second Party”). The term of this Agreement shall begin on ____ and shall continue through its termination date of ______. This document is “expecting” that someone writes down the names of the two parties signing the agreement and a two dates (start and end of the agreement).

In order to convert this simple document into a docusuit_ template we would have to do something like this:

This Contract is entered into by and between $TEXT_FirstParty$, (“First Party”), and $TEXT_SecondParty$, (“Second Party”). The term of this Agreement shall begin on $DATE_Start$ and shall continue through its termination date of $DATE_End$.

You may see that we have introduced “placeholder variables” wherever we expect the data to be inserted and:

  • These variables are enclosed between $ symbols (although any other predefined character may also do).
  • Each variable has a prefix, in this particular case “TEXT” or “DATE” that indicates the expected type of data: a single string of text in the first case and a date in the second (the date format can be later managed in the docusuit_ user interface).

When this document (example document preprocessed) is uploaded into docusuit_ this automatically knows that it has to generate a web form including two simple text fields (FirstParty and SecondParty), that will be filled by their corresponding text input fields, and two date fields (Start and End), that will be chosen from the typical datepicker.

Of course some extra work would be needed in order to have a nice looking form with adequate labels, tips, proper validation, etcetera, but that will be the subject matter of other section of this tutorial: How to prepare a web form via the docusuit_ web interface.

Although very simple, the example above already gives us a clear hint of all the tagging that would be needed to generate a full fledged web form out of a sophisticated legal document.

But first of all, we would like to do some general comments about the structure of the docusuit_ variables that we should include in our template:

  • docusuit_ is instructed to look for placeholder variables in the template with structure $XXX_YYY$. Although the “$” and “_” could, in principle, be substituted for other choices.
  • This implies that the user chosen names “XXX” and “YYY” should not contain those characters or otherwise docusuit_ may get confused.
  • The internal value of the variable corresponds to the last name after the last “_”. For example the internal name for the variable $XXX_YYY_ZZZ$ will be ZZZ. This variable named “ZZZ” has to be unique for different variables (for current template): even if the prefix differs, internally, it will be considered as the same variable. As you see here a variable can have, in principle, more than one prefix (you will soon learn why it may be useful to do so).

NOTICE: The docusuit_ interface allows for the insertion of variables that are not included in the original template but that may be useful to construct a more usable web form.