How can I get the form calculator to work properly?