Reference length of form fields in preventZoom function

This improves performance a little bit.