# Introduction

*Last updated 19/04/2024*

## Introduction

Five's If fields allow you to add a JavaScript condition. These fields offer a flexible way to define conditional behavior within your application. By utilizing an If (conditional) field, you can specify that a field's behaviour should be determined by the value of one or more conditions.

## Field Equations

There are two accepted formats for If based fields, you can use constant values or equations. When using equations Five's internal properties and functions can be used in the If fields.

### Constant Values

The following examples for constant values are used in a Show If field, the values are the same for all other If fields.

Constant value of true indicating to show the field. Example,

Constant value of false indicating to hide the field. Example,

### Equations Evaluated in JavaScript Using Five's Properties and Functions

Equations evaluated in JavaScript must start with an equals

The following are examples of equations and equations using Five's properties that can be used in the If fields.

*Field1*has a value of show-it, the field will display. This kind of evaluation is dynamic, and therefore can return

Brackets are optional, the above three expressions can also be written as:

The following are examples of equations using Five's functions that can be used in the If fields.

The following are examples of equations using a combination of Five's properties and functions that can be used in the If fields.