Method Community

 

Web-to-Lead form Header HTML not provided

Last post 02-24-2011 10:18 AM by Method_Paul. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 02-11-2011 9:36 AM

    Web-to-Lead form Header HTML not provided

    When I generate the Web-to-Lead form Method is displaying the Body HTML but not the Header HTML.

    How do I generate the Header HTML?

  • 02-11-2011 10:00 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

    Hi,

    WebForms is usually just a part of the a larger web page, and for that reason it does not generate the header portion.
    Instead, we have used a meta tag <META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">, which is
    accepted by all common browsers and can be used instead of the <HEAD> portion.

    However, if you do need a proper web page, 100% W3C Valid, that will have an HTML head portion then follow these simple steps:

    1. Replace
    <META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
    with following html:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>


    2. After last </script> tag and before <form action="https://www.methodintegration.com/method/timezonerouter.aspx?url=https://www.methodintegration.com/MethodWebForms/submit.aspx" onsubmit="return validate_form(this)" method="POST">
    you should insert following tags </head><body>

    3. At the very end of WebForm, after </form> you need to put </body></html>

     

    This will give you a solid HTML page that passes W3C validation.

    Thank you,
    Victor

  • 02-11-2011 11:58 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

    I think the header is working fine but we are not successfully connecting to Method.

    We are running the test in a test environment.

    You can see the page @ http://varzero.webomanager.com/contact-us

    I added http://varzero.webomanager.com to the list of referring sites in the form customization.

    On send we get an error: "We couldn't authenticate web form provider. Please contact web form provider for any additional information."

    I also get an email with the following: "Your client had encountered an error with web form Web-To-Lead. This may be due to incorrect setup of the web form. The error encountered was: The URL from which web form was submitted is not within a selected refferer list.

    Then it sends a copy of the request string. Let me know if you would like me to send it along.

    Thanks for your help.

     

     

  • 02-14-2011 8:27 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

     Hi Victor,

    Did you have a chance to look at my secondary issue?

    Thanks.

    Ken

  • 02-14-2011 8:33 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

    Hi Ken,

    I am working on it right now and I will respond as soon as possible.

    Sorry for the wait.

     

    Victor

  • 02-14-2011 8:41 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

     Thanks.

  • 02-14-2011 9:19 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

    Hi Ken,

    I've figured out why you had the error "We couldn't authenticate web form provider. Please contact web form provider for any additional information." The problem is that in In "Step 1 of 9" of the wizard, you didn't include the correct URL of your website. You made a small spelling mistake and entered "http://varzero.webomanger.com" instead of "http://varzero.webomanager.com". As soon as you fix this little problem, everything should start working as expected (and you don't even need to touch the HTML, just fix it on the Method website).

    Thank you

    Victor

  • 02-16-2011 9:31 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

    We fixed the URL. Now when we submit the form, the page is redirect4ed to: https://www.methodintegration.com/method/TimeZoneRouter.aspx  and just sits there as a blank screen.

  • 02-16-2011 11:55 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

    Hi Ken,

    I beleive I know what the problem is. Try changing <input type="submit" value="Submit" name="submit" id="submit_web_form"> in HTML to <input type="submit" value="Submit" name="submit_web_form" id="submit_web_form">

    That should solve the issue.

    Thank you

    Victor

  • 02-16-2011 2:09 PM In reply to

    Re: Web-to-Lead form Header HTML not provided

     Thanks, Victor

    Things seem to be working now. I also had a  devil of a time getting the email server working but I think that is set, too.

    One (hopefully) last question:

    We would like to return a screen which says "Thank you for submitting your information.  A representative will contact you shortly."  After the prospect presses SUBMIT.

    Can we do that?  Do you have any sample code?

    Thanks.

    Ken

  • 02-16-2011 2:25 PM In reply to

    Re: Web-to-Lead form Header HTML not provided

    Hi Ken,

    In order to return "Thank you for submitting your information.  A representative will contact you shortly." screen you need to do the following:

    1. On "Welcome to Method Web Forms" screen (which is the first screen) choose "Load Existing Web Form" radio button

    2. Choose your "Web-To-Lead" web form and click Load

    3. Go to "Step 6 of 9: Thank you page?" step of the wizard

    4. Put a check-mark for "Take customers to a specific URL after they submit the form."

    5. Enter a URL for your custom "Thank you for submitting your information.  A representative will contact you shortly." web page (eg. http://marylandaccidentlawyers.com/thanks/)

    6. Click "Finish"

     

    You are done! You don't need to edit HTML, the settings will be applied immediately. As soon as user submits the web form, he will be redirected to the "Thank you" web page.

     

    Thank you

    Victor

  • 02-17-2011 4:07 PM In reply to

    Re: Web-to-Lead form Header HTML not provided

     I think everything is all set. Going live tomorrow. Thanks for all of your help.

  • 02-21-2011 11:30 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

     Victor,

    In doing our final testing, there doesn't seem to be any form validation. For example, the fields identified with asterisks as being required are not really required. And I would like to have the form test to make sure that the email is a valid format. 

     

    Thanks.

  • 02-22-2011 8:45 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

    Hi Ken,

    The reason why no validation was being done for you is because for form tag you have used, you were missing an important attribute "onsubmit" that was included in the original HTML that was produced by Method Web Forms. This is how it should look

    <form action="https://www.methodintegration.com/method/timezonerouter.aspx?url=https://www.methodintegration.com/MethodWebForms/submit.aspx" 
       onsubmit="return validate_form(this)" method="POST">

    For the validation of the email format here is what you will need to do:

    Inside JavaScript function "validate_form(thisform)" between the

    if (validate_maxLength("Description_Step3""vld_Description_Step3""Products / Services: maximum length should be 4000 characters!", 4000) == false)
    { document.getElementById("Description_Step3").focus(); return false; }


    and

    document.getElementById('submit_web_form').disabled = true;


    You will need to insert the following script

    var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}$/;
    if (emailPattern.test(document.getElementById("Email_Step2").value) == false) {
       document.getElementById("vld_Email_Step2").innerHTML = "You email is invalid.";
       document.getElementById("Email_Step2").focus();
       return false;
    }
    else {
       document.getElementById(alertField).innerHTML = "";
    }

    If in the future you will need to implement more data validations, you will be able to create them yourself, based on the example I've given.

     

    Thank you

    Victor

  • 02-22-2011 10:16 AM In reply to

    Re: Web-to-Lead form Header HTML not provided

     I have pasted in the HTML which Method generated and I passed along to my programmer. There doesn't seem to be any onsubmit functionality in the code.

    <!-- INSERT THE FOLLOWING IN BETWEEN THE ‘BODY’ TAGS IN YOUR HTML PAGE -->
    <META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
    <script src="https://www.methodintegration.com/MethodWebForms/Javascript/formValidation.js" type="text/javascript"></script>
    <script type="text/javascript">
    function validate_form(thisform){
         with (thisform){
     if (validate_required("FirstName_Step2","vld_FirstName_Step2","First Name must be filled out!")==false)
    {document.getElementById("FirstName_Step2").focus();return false;}
     if (validate_required("LastName_Step2","vld_LastName_Step2","Last Name must be filled out!")==false)
    {document.getElementById("LastName_Step2").focus();return false;}
     if (validate_required("Phone_Step2","vld_Phone_Step2","Phone must be filled out!")==false)
    {document.getElementById("Phone_Step2").focus();return false;}
     if (validate_required("Email_Step2","vld_Email_Step2","Email must be filled out!")==false)
    {document.getElementById("Email_Step2").focus();return false;}
     if (validate_maxLength("Description_Step3","vld_Description_Step3","Products / Services: maximum length should be 4000 characters!",4000)==false)
    {document.getElementById("Description_Step3").focus();return false;}
             document.getElementById('submit_web_form').disabled=true;
         }
    }
    </script>

    <form action="https://www.methodintegration.com/method/timezonerouter.aspx?url=https://www.methodintegration.com/MethodWebForms/submit.aspx" onsubmit="return validate_form(this)" method="POST">
    <input type="hidden" name="oid" value="6rfk02WvNXej9bVFGxdrjQ=="/>
    <input type="hidden" name="retURL" value="http://varzero.webomanager.com/thankyou"/>
    <input type="hidden" name="formName" value="Web-To-Lead"/>
    <table>
       <tr>
          <td  valign ="top">
             <label for="CompanyName_Step2">Company Name</label>
          </td>
          <td>
             <input type="text" id="CompanyName_Step2" name="CompanyName_Step2" maxlength="41" size="20" value="" />
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="FirstName_Step2">First Name</label>
          </td>
          <td>
             <input type="text" id="FirstName_Step2" name="FirstName_Step2" maxlength="25" size="20" value="" />
             <span id="vld_FirstName_Step2" style="color:Red">*</span>
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="LastName_Step2">Last Name</label>
          </td>
          <td>
             <input type="text" id="LastName_Step2" name="LastName_Step2" maxlength="25" size="20" value="" />
             <span id="vld_LastName_Step2" style="color:Red">*</span>
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="Phone_Step2">Phone</label>
          </td>
          <td>
             <input type="text" id="Phone_Step2" name="Phone_Step2" maxlength="21" size="20" value="" />
             <span id="vld_Phone_Step2" style="color:Red">*</span>
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="Email_Step2">Email</label>
          </td>
          <td>
             <input type="text" id="Email_Step2" name="Email_Step2" maxlength="1023" size="20" value="" />
             <span id="vld_Email_Step2" style="color:Red">*</span>
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="BillAddressAddr3_Step2">Address</label>
          </td>
          <td>
             <input type="text" id="BillAddressAddr3_Step2" name="BillAddressAddr3_Step2" maxlength="41" size="20" value="" />
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="BillAddressCity_Step2">City</label>
          </td>
          <td>
             <input type="text" id="BillAddressCity_Step2" name="BillAddressCity_Step2" maxlength="31" size="20" value="" />
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="BillAddressState_Step2">State / Province</label>
          </td>
          <td>
             <input type="text" id="BillAddressState_Step2" name="BillAddressState_Step2" maxlength="21" size="20" value="" />
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="BillAddressPostalCode_Step2">Postal Code</label>
          </td>
          <td>
             <input type="text" id="BillAddressPostalCode_Step2" name="BillAddressPostalCode_Step2" maxlength="13" size="20" value="" />
          </td>
       </tr>
       <tr>
          <td  valign ="top">
             <label for="BillAddressCountry_Step2">Country</label>
          </td>
          <td>
             <input type="text" id="BillAddressCountry_Step2" name="BillAddressCountry_Step2" maxlength="31" size="20" value="" />
          </td>
       </tr>
    </table>
    <table>
       <tr>
          <td  valign ="top">
             <label for="Description_Step3">Products / Services:</label>
          </td>
          <td>
             <textarea rows="5" id="Description_Step3" name="Description_Step3" ></textarea>
             <span id="vld_Description_Step3" style="color:Red"></span>
          </td>
       </tr>
    </table>
    <input type="submit" name="submit_web_form" id="submit_web_form" value="Submit" />
    </form>

Page 1 of 2 (18 items) 1 2 Next >