Custom javascript causing required form fields to no longer be required

Anonymous
Not applicable

Custom javascript causing required form fields to no longer be required

Hi everyone,

I recently added a small amount of javascript to an existing landing page. The landing page included a form with required fields for submission.  

The issue I ran into was that as soon as the custom javascript was added the form is able to be submitted even without any values in the required fields.

I tried to move the html block to before the form as well as after and even tried to place it in the head section of the page but still having the issue. 

thinking I was doing something wrong I followed this articles example: http://community.marketo.com/MarketoArticle?id=kA050000000KysHCAS and still was able to submit the form without filling in the required fields

Has anyone else run into this?

thanks,
Matt


Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Custom javascript causing required form fields to no longer be required

We have custom javascript in an HTML element on our landing page that validates that the email address domain is not a public email domain and javascript on the landing page template that formats the phone number as it is entered, and it has not allowed our required fields to be by-passed.  Any required field can be by-passed if the visitor's browser has java script turned off though.  Is your's turned on?  You may also need to set no conflict mode for jquery using a statment like  var $jQ = jQuery.noConflict();