Ensure the form is correctly detected in JS