Fixed borked javascript in the form