Contact Form Processing Products - for all your needs

FormMail • Form Encryption • Hosted Forms


This page documents the ZERO_IS_EMPTY configuration setting in FormMail.

Type Of Setting

ZERO_IS_EMPTY is an OPTIONAL setting, which means...

OPTIONAL : you can change this setting if you need to, but the default value is fine for most circumstances.


Controls what "empty field" means.


Set ZERO_IS_EMPTY to false if you don't want a field containing exactly "0" (without the quotes) to be treated as empty.

The default behaviour of PHP is to treat a field containing "0" as empty. Older versions of FormMail operated with this behaviour.

In many cases this is what you would want for a web form.

By setting ZERO_IS_EMPTY to false, a field must be completely empty to be treated as such.

By setting ZERO_IS_EMPTY to true, a field can be completely empty or contain "0", to be treated as empty.

This setting affects "required" testing, the "+" operator in "derived_fields", "conditions" testing, and template filling.


If you're upgrading from version 6.01 or lower of FormMail through the Upgrade Wizard, the setting will be set to "true" to replicate previous behaviour. New FormMail downloads get the setting as "false".

Default Value

From version 9 onwards:

$ZERO_IS_EMPTY = false;

Before version 9:



From version 9 onwards:

$ZERO_IS_EMPTY = true;

Before version 9: