---
title: "Define form fields"
id: "define-form-fields"
project: "EHR User Guide"
url: "https://help.cloud5.com.au/articles/ehr-user-guide/define-form-fields"
updated: 2026-10-19T00:52:39Z
---

# Define form fields

To define (add, update, or delete) a form template's fields:![](/resources/Storage/ehr-user-guide/ehr-user-guide/icons/desktop%20icon.png)

1. Go to the **Form Fields Definition** screen.
2. To:
    1. add (define) a new field, position the cursor where you want to insert the new field and then click **New**. Go to step 3.
    2. update an existing field's definition, select the row containing the field, and then click **Open**. Go to step 3.
    3. delete an existing field, select the row containing the field, and then click **Delete**. At the **Form Fields Definition - Delete** screen, click **Save**. EmpowerHR deletes the field and adjusts any pre-existing fields' sequence numbers. No further action is required.
3. At the **Form Fields Definition** details screen, complete or update the field definitions using the following tables as a guide.

| **At this field...** | **Do this...** |
| --- | --- |
| Form Code | Nothing. EmpowerHR displays the form code. |
| Field | Nothing, EmpowerHR displays the sequence number for the form field. |
| Field Title | Enter a title for the field (up to 30 characters). |
| Field Info | Enter information you want to display on the form to assist the user (up to 500 characters). |
| Data Type | Click **Window**, find and double-click the code to add it to the **Data Type** field. |
| Display Format | If you selected **f** (Floating Point Number) as the **Data Type**, then enter a valid display format, **fx.y**, For example **f6.2**,******f10.7**<br><br>Otherwise, leave this field blank. |
| Length | Depending on the **Data Type** you selected, enter the length of the field (number of characters). |
| Validation | Depending on the **Data Type** and **Length** you set, do one of the following:<br><ul><li><span style="font-size: 10pt;">Click <b>Window</b>, find and double-click the code to add it to the <b>Validation </b>field, <i>or</i></span></li><li><span style="font-size: 10pt;">Leave this field blank.</span></li></ul><br>See the following table, [field validation explained](/articles/ehr-user-guide/define-form-fields/a/h3_139641583), for more information. |
| Same Line as Previous Fld (y/n) | If you want to display two fields on the same line, enter **y**.<br><br>Otherwise, enter **n**. |
| Required Selection (y/n) | If you selected **s** (Selector List) as the **Data Type**, you can enter **y** here to require the user to select a value in the field<br><br>Otherwise, EmpowerHR displays the default, **n**. |
| SQL | | ![Information](/resources/Storage/ehr-user-guide/ehr-user-guide/Info.png) | Only use this field if you selected **h** (Database SQL hook) or **e** (Table) as the **Data Type**. |<br>| --- | --- |<br><br><br>Enter the SQL commands EmpowerHR executes to populate the field or table.<br><br>See [SQL for self service forms](/smart/project-ehr-technical-user-guide/sql-for-self-service-forms) in the EHR Technical User Guide ![](/resources/Storage/ehr-user-guide/icons/info%20icon%20-%20small.png) for examples of SQL statements and tags.<br>If you don't have access to the EHR Technical User Guide, you can log an [iHelp request](https://infusion.fusion5.com/) and we will provide login credentials to you. |

1. Click **Save**. Where you add or delete a field, EmpowerHR adjusts any pre-existing fields' sequence numbers.

### Field validation explained

Here's how field validation behaves according to:

* Data Type
* Display Format
* Length

| **Data Type** | **Display Format** | **Length** | **Validation** |
| --- | --- | --- | --- |
| b (Checkbox) | Not enterable | Not enterable | Not enterable |
| c (Character) | Not enterable | 10<br><br><br><br>1 - 500 | If **Length** is **10**, enter **empl (Must Be a Valid Employee)**<br><br>If **Length** is between **1** and **500:**<br><br>Click **Window**, select **blank** **(** **Must Be Blank)**, **nblnk** **(Must Not Be Blank)**, or **yes/no** **(Must Be (y)es or (n)o)**<br><br>*or*<br><br>Leave this field blank |
| d (Date) | Not enterable | Not enterable | Click **Window**, select **blank** **(** **Must Be Blank)**, *or***nblnk** **(Must Not Be Blank)**<br><br>*or*<br><br>Leave this field blank |
| e (Table) | See [define table field](/articles/ehr-user-guide/define-table-field) for more information | Not enterable | Not enterable |
| f (Floating Point Number) | Enterable | 4 or 8 | Click **Window**, select **nzero** **(** **Must Be Zero)**, *or* **zeros** **(Must Not Be Zero)**<br><br>*or*<br><br>Leave this field blank |
| h (Database SQL hook) | See [define database SQL hook](/articles/ehr-user-guide/define-database-sql-hook) for more information | Not enterable | Not enterable |
| i (Integer) | Not enterable | 1, 2 or 4 | Click **Window**, select **nzero** **(** **Must Be Zero)**, *or***zeros** **(Must Not Be Zero)**<br><br>*or*<br><br>Leave this field blank |
| l (Form Section Label) | Not enterable | Not enterable | Not enterable |
| m (Money) | Not enterable | Not enterable | Click **Window**, select **nzero** **(** **Must Be Zero)**, *or* **zeros** **(Must Not Be Zero)**<br><br>*or*<br><br>Leave this field blank |
| s (Selector List) | Not enterable | 1, 4 or 8 | Click **Window**, find and select a valid code. The lookup window displays the available codes based on the **Length** (that is, Code Type 1, 4, or 8).<br><br>You cannot leave this field blank. |

| Next topic<br><br>[Define database SQL hook](/articles/ehr-user-guide/define-database-sql-hook) |
| --- |

© 2023 Fusion5. All rights reserved.