HireHop Documents

All documents use an element's name attribute to set the field (a "merge field").

Documents are fully HTML5, JavaScript and CSS3 compatible, even when exported as a PDF. All fields get classes added to them by the document engine to show their state, what they are, etc. to help you with formatting and any JavaScript manipulation.

Merge Field

An element that will be populated with a specific specific field value. A today date field html code will look like this, being made up of a table and a field:

<span name="general:date">{{general.date}}</span>

Please note that a merge field element will erase and replace its contents with the field value. This also means that if a merge field element is embedded inside another merge field element, the embedded one will be erased!

The element's contents, including the curly braces "{{" and "}}", are to make it easy for you to read and no other purpose.


A "fieldset" is something that loops by duplicating itself by how many rows in the fieldset there are, eg.:

  <tr name="items:">
    <td name="items:name">{{items.name}}</td>

The above will create a table and duplicate the row (<tr>) and everything inside it as many times as there are items in the job.

Loop Field

A "Loop field", which is useful in things like projects, is similar to a "fieldset" in that it duplicates itself. An example is "project_jobs~" which duplicates itself depending how many jobs in a project, and sets the variables to be that particular job, eg.:

<div name="project_jobs~">
  <span name="job:job_name">{{job.job_name}}</span>

The above will duplicate itself for how many jobs in a project, and inside the <div>, everything is as if it was a job, even the depot is set to the depot the job is assigned to.

Automatic Assignments

In certain circumstances, field values will be automatically set. For instance the contact fields will be set if a job is assigned to a client in the address book, the depot fields would be assigned to the depot the job is in, etc.


The document can use HireHop's API using Ajax calls within the document, and will be restricted to the permissions of the user who generates the document. As an example, see the source code in this document that when inserted into a document, uses the API only to get data and no fields.

You can also load third party frameworks, such as JQuery, Bootstrap, etc. into a document.

Some merge fields change value when subsequent data is loaded, for example a depot merge fields start off with the data of the depot the user is in, then after the first job data merge field is used in a document, from that point onwards, the depot merge fields contain data about the depot the job is in. Any previous depot merge fields will remain unchanged.

Base Index