What is a custom field?

A custom field enables your team to collect additional information at checkout. For example, you can ask your bookers for the traveller's cost code or the reason for travel.

The additional information appears on bookings and is output as custom data on reports.

How to restrict the text that a booker inputs

When you create a custom field, you can choose to set the Type to text:

At checkout, this type of custom field asks the booker to type in the additional information into a text box:

You can choose whether or not to restrict:

  • the number of characters that are typed in (i.e. Minimum length and Maximum length), and
  • which characters are valid characters:

You can leave all the above items blank. Then the booker has complete freedom over what they type in at checkout. 

Or you can use the above items to limit what the booker can type in at checkout. Predefining the format of the text that is input can be helpful when the additional information has a specific format (e.g. a cost code). It's a good way to try and avoid collecting incorrect data because mistakes have been made at checkout (e.g. too many numbers input).

You can go one step further by selecting the advanced configuration option for valid characters.

Valid characters advanced configuration option

The advanced configuration option involves creating a masked textbox. You do this by defining a formula that forces users to type in information in the correct format:

  • Square brackets The contents of a pair of square brackets defines what the user can type in. For example, to specify upper- and lower-case letters only, use [A-Za-z] . 
  • Curly brackets The contents of a pair of curly brackets defines the number of characters that the user can type in. For example, to specify 6 characters (no more, no less), use {6} .

A pair of square brackets is always immediately followed by a pair of curly brackets e.g. [A-Za-z]{6} .

The formula can include more than one combination.

Masked format examples

  • 6 numbers (e.g. 123456):
  • 5 upper-case letters or lower-case letters or numbers (e.g. S12vx):
  • 2 upper-case letters followed by 6 numbers (e.g. AB123456):
  • 2 upper-case letters followed by a hyphen followed by 6 numbers (e.g. AB-123456):
  • MAR followed by 5 numbers or upper-case letters (e.g. MAR5SM20):
  • 123 followed by 3 alphanumeric characters (e.g. 123A9b):
Did this answer your question?