> ## Documentation Index
> Fetch the complete documentation index at: https://support.servicem8.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Forms - How to link the Contract Variation form to the Contract Variation document template

> Learn about forms - How to link the Contract Variation form to the Contract Variation document template in ServiceM8.

This lesson will show you how to link a simple contract variation form with a document template.

There are three steps in creating a working form, linked to a document template.

1. Create the document template that will house the text and the answers from the form

2. Create the form with its questions

3. Link the question answers provided by the form to the document template

## Create the document template for your Contract Variation form

<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-825-8e256d6a-56c1-46b9-a4fb-c3bd02b1ae06.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=462944e9666c67ce30ccb9ecaf4a5ba3" alt="Create the document template for your Contract Variation form" width="558" height="625" data-path="images/006-811-825-8e256d6a-56c1-46b9-a4fb-c3bd02b1ae06.png" />

You can build from the scratch, or modify an existing document template to suit your particular requirements.

The template above is used as the document for the Contract Variation template. It contains merge fields from the job and merge fields from the form.

There is a place for your company logo in the top header section. The address, phone, and email details could be replaced with you actual company details.

If you do not know how to do this, read the relevant lesson on [How do I create a custom invoice/quote/work order template?](/help-center/advanced-setup/invoice-quote-templates/how-to-modify-invoice-or-quote-templates) article.

**Once completed it will be now ready to be uploaded into the Contract Variation form.**

## Then go to Settings and click Forms

[<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-827-medium-aae46cd2-bfa9-40e3-a106-fcbb5cdfe71e.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=c0d049db648dee1b97d081cdefc19707" alt="Then go to Settings and click Forms" width="855" height="238" data-path="images/006-811-827-medium-aae46cd2-bfa9-40e3-a106-fcbb5cdfe71e.png" />](/images/006-811-827-aae46cd2-bfa9-40e3-a106-fcbb5cdfe71e.png)

## Click Open Form

[<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-828-medium-ea168100-798d-40cc-be1e-2f748a8a92bd.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=3d4846ecc0664d2758a57929722129f0" alt="Click Open Form" width="855" height="269" data-path="images/006-811-828-medium-ea168100-798d-40cc-be1e-2f748a8a92bd.png" />](/images/006-811-828-ea168100-798d-40cc-be1e-2f748a8a92bd.png)

If you do not already have a sample form, see the lesson on [Creating a simple Contract Variation Form](/help-center/servicem8-add-ons/forms/creating-a-simple-contract-variation-form).

## Select the Contract Variation form template that you have created

<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-830-3960b4ea-32a5-4462-b7c9-97bc13e4ea73.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=b01de5b08fab19e3ead7021af162827a" alt="Select the Contract Variation form template that you have created" width="808" height="189" data-path="images/006-811-830-3960b4ea-32a5-4462-b7c9-97bc13e4ea73.png" />

Leave the form name and the badge name the same as they are. Simply browse and select the contract variation form from your computer and then save the form.

**NOTE:** The badge you have named in your form here appears as a badge on the side of the Job Card.

If you add the Form's Badge to a job, the form will appear on the mobile app as a job checklist item. This is a good way to ensure staff are aware that there is a form that needs to be filled in on this job.

## Save the form

<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-832-b48dd783-c38f-45b8-a29d-9c3e7c93413b.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=649f7a849ccd4a855279bb293a08e5a0" alt="Save the form" width="746" height="713" data-path="images/006-811-832-b48dd783-c38f-45b8-a29d-9c3e7c93413b.png" />

At the end of this step you have linked your form to the document template. The next step is to place the form answers into your document.

## Overview of where the Template Field Codes from the form fit into the document template

[<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-834-medium-8db19d28-ef93-4801-a1d5-ec0676576970.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=751c442a9a21f638720c0a7fc2e2bb0c" alt="Overview of where the Template Field Codes from the form fit into the document template" width="855" height="391" data-path="images/006-811-834-medium-8db19d28-ef93-4801-a1d5-ec0676576970.png" />](/images/006-811-834-8db19d28-ef93-4801-a1d5-ec0676576970.png)

**TIP:** Click the image to enlarge.

## How to insert a form "Template Field Code" into a document template

<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-836-ff7564ec-f25f-4b71-8563-5dd741065b50.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=e33ae72fc4748280e34f772f859f0c47" alt="How to insert a form &#x22;Template Field Code&#x22; into a document template" width="94" height="80" data-path="images/006-811-836-ff7564ec-f25f-4b71-8563-5dd741065b50.png" />

Using Microsoft Word, open the document template that you want to link with the form.

Place the cursor on this document where you would like the results of the form template field code to appear and proceed as below.

## Click the Insert tab then the Quick Parts drop down and select Field...

<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-837-befdfd9d-8ef6-45f7-9eea-a8036fc6e99d.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=58a66ec86c5cfc8c9865631f789ee591" alt="Click the Insert tab then the Quick Parts drop down and select Field..." width="648" height="188" data-path="images/006-811-837-befdfd9d-8ef6-45f7-9eea-a8036fc6e99d.png" />

## Select MergeField, enter the Field Name and click OK

<img src="https://mintcdn.com/servicem8/-pNiNRA7dAMF69SG/images/006-811-839-61416659-7e29-412a-9d61-0b7df54c6e60.png?fit=max&auto=format&n=-pNiNRA7dAMF69SG&q=85&s=ce36365ca24f5a95129ba48fc4b8b411" alt="Select MergeField, enter the Field Name and click OK" width="756" height="462" data-path="images/006-811-839-61416659-7e29-412a-9d61-0b7df54c6e60.png" />

Copy and paste into the **Field Properties > Field name** textbox the **Template Field Code (form\_variation\_detail)**.

Repeat this process for all Template Field Codes. Save the template and reload it into ServiceM8.

**Always test your template first before using it on real jobs.**
