Fixed reference to the "toggle" variable to the usage of the $field variable defined above in the calculate function.

Signed-off-by: Elliot Condon <e@elliotcondon.com>