Web2Lead trouble

Hello!

Today i faced with some problem with web2Lead form.
So, i was created the web2lead form and download it in html format.
When i opened it, it shows all information that i need, but when i fill all nessesary fields and press the submit button, it doesn’t show anything.
And if i live only one required field empty, it show’s me the message “Please, fill all required fields”.
Please help me with this problem!

Hi,

When you say “press the submit button, it doesn’t show anything.”
Do you mean that it takes you to a blank page, It refreshes the page, or nothing happens at all? Could you specify this?

Open the console on your browser, (CTRL+SHIFT+K in Firefox, CTRL+SHIFT+J in Chrome), and click the Submit button on the Form.
Do any errors appear in the console?

It will show “Please, fill all required fields”, when a required field is not filled. This is standard functionality, as it is a required field, so it should be filled with data.

Hi John!

When i press the submit button, nothing happens at all.
In the browser console it shows me the error:

Uncaught TypeError: Cannot read property ‘value’ of null

and point on the next lines in my html:

if(document.getElementById(req_fields[i]).value.length <=0 || document.getElementById(req_fields[i]).value==0){
check_webtolead_fields();
<td colspan="8"><input class="button" onclick="submit_form();" type="button" name="Submit" value="Отправить" /></td>

I really don’t know what happened, because i didn’t change anything in the html after i save it from wizard.
here all my java script:

<script type="text/javascript">// <![CDATA[
function submit_form(){
 	if(typeof(validateCaptchaAndSubmit)!='undefined'){
 		validateCaptchaAndSubmit();
 	}else{
 		check_webtolead_fields();
 	}
 }
 function check_webtolead_fields(){
     if(document.getElementById('bool_id') != null){
        var reqs=document.getElementById('bool_id').value;
        bools = reqs.substring(0,reqs.lastIndexOf(';'));
        var bool_fields = new Array();
        var bool_fields = bools.split(';');
        nbr_fields = bool_fields.length;
        for(var i=0;i<nbr_fields;i++){
          if(document.getElementById(bool_fields[i]).value == 'on'){
             document.getElementById(bool_fields[i]).value = 1;
          }
          else{
             document.getElementById(bool_fields[i]).value = 0;
          }
        }
      }
    if(document.getElementById('req_id') != null){
        var reqs=document.getElementById('req_id').value;
        reqs = reqs.substring(0,reqs.lastIndexOf(';'));
        var req_fields = new Array();
        var req_fields = reqs.split(';');
        nbr_fields = req_fields.length;
        var req = true;
        for(var i=0;i<nbr_fields;i++){
          if(document.getElementById(req_fields[i]).value.length <=0 || document.getElementById(req_fields[i]).value==0){
           req = false;
           break;
          }
        }
        if(req){
            document.WebToLeadForm.submit();
            return true;
        }
        else{
          alert('Пожалуйста, заполните все необходимые поля');
          return false;
         }
        return false
   }
   else{
    document.WebToLeadForm.submit();
   }
}
function validateEmailAdd(){
	if(document.getElementById('email1') && document.getElementById('email1').value.length >0) {
		if(document.getElementById('email1').value.match(/^\w+(['\.\-\+]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/) == null){
		  alert('Неверный адрес E-mail');
		}
	}
	if(document.getElementById('email2') && document.getElementById('email2').value.length >0) {
		if(document.getElementById('email2').value.match(/^\w+(['\.\-\+]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/) == null){
		  alert('Неверный адрес E-mail');
		}
	}
}
// ]]></script>

Hi,

Are you certain that you are filling in all of the Required fields?
If you are, It may be worth generating the WebtoLead form again, as there may be an issue with it.

If you are still having issue after generating a new WebtoLead form, could you attach it?

John,

Yes, I fill all req fields.

I try create another form but it works exactly the same.