---
title: "Sub Form"
url: "https://helpcentre.esayworkmobile.co.uk/en/article/sub-form"
language: "en"
last_updated: "2024-02-08T14:53:27.405Z"
---

# Sub Form

There are many instances in the real-world whereby you'll have a form that contains an element of repeating data in the form of a grid or table. This principle can be replicated within WorkMobile using a feature known as subforms. The best way to illustrate this is with a simple example.

### **Sub Form**

![](https://d2x3xhvgiqkx42.cloudfront.net/9b95b20b-0d92-44a6-a8ed-f00ed68183a1/f9c015a2-0bfd-462e-8d4b-1b90e0a666dc/2019/02/20/781a1be7-1978-4d0e-8e88-b8112baa0bea.png)

| Property | Description |
| --- | --- |
| Sub Form | This is the name of the existing form that you wish to use as a sub-form |
| Summary x | Specifies which field on the sub-form that you wish to see on the main form as an identifier within the sub-form list |

In addition, also has the common [standard properties](https://helpcentre.esayworkmobile.co.uk/en/article/common-toolbox-properties-reference)

The best way to illustrate how and when to use a sub-form is with a simple example:

Imagine that we had a paper based form such as the one below:

![](https://d2x3xhvgiqkx42.cloudfront.net/9b95b20b-0d92-44a6-a8ed-f00ed68183a1/f9c015a2-0bfd-462e-8d4b-1b90e0a666dc/2019/02/06/bd698ce0-32a3-4cf3-a42e-7f3e0e16fffa.png)

The table contains repeating data whereby you could capture from 1 to 5 records. You could build this in WorkMobile by duplicating the part name, qty, serial number and comments fields 5 times, however it’s much quicker and neater to implement this as a sub-form.

## **Building the Solution**

To build the above solution, we first need to build the sub-form, i.e. the parts used table. This is effectively a form which will be used to capture the 'repeating' element of the main form.

![](https://d2x3xhvgiqkx42.cloudfront.net/9b95b20b-0d92-44a6-a8ed-f00ed68183a1/f9c015a2-0bfd-462e-8d4b-1b90e0a666dc/2019/02/06/c903fd1a-756a-4250-8162-95b1c28e7010.png)

In our example, we’ve called this form *Parts Used* and we’ve built it as a standard WorkMobile form.   
Next, we need to build the ‘parent form’ that will contain the sub-form that we’ve just built.

### **Building the Main 'Parent' Form**

In this example, we can build a main form as per normal, however when we get to the 'repeating' section we need to use the **sub-form** tool. Drag a **sub-form** tool onto your canvas and then:

-   Set the **Sub Form** property to *Parts Used*. This tells the tool which form to use as the sub form.

As you can see, this form uses the **sub-form** tool. If you look at the properties panel, you can see that the Sub form property has been set to *Parts Used*. This is the name of the form that we want to embed within this form.

-   To insert a subform, select the subform field from within the **Misc** menu located on the left-hand side of the form designer.
-   Next we need to configure the summary fields. These are the fields on the sub-form that you'll choose to be displayed on the mobile device in order to identify each individual record. A sensible choice may be:
    -   Part Name
    -   Qty Used
    -   Serial Number

![](https://d2x3xhvgiqkx42.cloudfront.net/9b95b20b-0d92-44a6-a8ed-f00ed68183a1/f9c015a2-0bfd-462e-8d4b-1b90e0a666dc/2019/02/13/46ba8b57-4c6f-46f8-86f9-54370cd5862e.png)

### **Using the sub-forms tool on mobile device**

-   Open the parent form from within the list of form entries and scroll down until you find the sub-form you require (in this instance **Parts Used**)
-   Complete the fields within the sub form and select the tick icon within the bottom left-hand corner.
-   If you want to add continuous rows of data, select the **+** within the bottom left hand corner and repeat the process as many times as required.

![](https://d2x3xhvgiqkx42.cloudfront.net/9b95b20b-0d92-44a6-a8ed-f00ed68183a1/d71377a4-915b-4e7b-9bbe-89f4ceea067f/2022/10/06/c301d422-b989-4605-a65a-7fd0d70bb9f6/acb9bfeb-49af-435d-bd43-1bdfdcd2f9db.png)

-   Select the back button within the sub-form menu to return to the parent form where you can continue to complete it.

### Nesting forms with in forms

There is no limit to the level of nesting you can implement when using sub-forms. You can, for example:

-   Organise your data into smaller, more manageable sections.
-   Add repeatable sections to your Sub Forms.
-   Simplify your form by breaking it down into logical groups of questions.
-   Reduce the need for multiple forms and the complexity that comes with managing them.

These Forms can then be used in the WorkMobile2.0 app for both Form and Job uploads.
