More undefined variable fixes in forms