<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<title>Metal Stamping Dies</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
</head>
<body>
<div class="container">
   
    <div class="row justify-content-center">
        <div class="col-12 col-md-8 col-lg-6 pb-5">
            <div class="card border-primary rounded-0">
                            <div class="card-header p-0">
                                <div class="bg-info text-white text-center py-2">
                                    <h3><i class="fa fa-envelope"></i> Lead Submit</h3>
                                    <p class="m-0">Lead Submit Form Metal Stamping Dies</p>
                                </div>
                            </div>
            <div class="card-body p-3">
          <script  src="//sas.elehue.com/form/generate.js?id=104"></script>
 </div>
 </div>
    </div>
</div>
</div>
 <?php 
 $user_ip = getenv('REMOTE_ADDR');
 $geo = json_decode(file_get_contents("http://api.ipstack.com/$user_ip?access_key=5a7916da55285f741698f098c1cc15be"));
 $country = $geo->country;
 $city = $geo->city;
 $region = $geo->region_name;
 $country = $geo->country_name;
?>


<script>
    var url = window.location.href; 
    $(document).ready(function(){
        $('#mauticform_input_msdws_submit').click(function(){
            wholeSale();
        });
    });  
</script>

<script>
function wholeSale()
    {
        var field1 = $("#mauticform_input_msdws_f_name").val();
        var field2 = $("#mauticform_input_msdws_phone").val();
        var field3 = $("#mauticform_input_msdws_email").val();
        var field4 = $("#mauticform_input_msdws_f_message").val();
      
        var lead_soruce = $("#mauticform_input_msdws_lead_source").val();
        var space = " + ";
        var field5= url.concat(space, lead_soruce); 

        var field6 = '<?php echo $city. ", ".$region.", ".$country; ?>';
        var fieldcheck = $("#mauticform_input_msdws_captcha").val();
       
        if(field1==''){  return false; }
        if(field2==''){  return false; }
        if(field3==''){  return false; }
        if(fieldcheck !=''){  return false; }
       
        else{
               
       $.ajax({
          url: "https://docs.google.com/forms/u/0/d/e/1FAIpQLSdu8AC9tes9wArMWMk7z2obXBjBFirz3tEEjPYCpZ-0GPROFg/formResponse",
          data: { "entry.84183550": field1, "entry.1158977148": field2, "entry.2092375914": field3, "entry.299049856": field4, "entry.1038437950": field5, "entry.74558044": field6 },
          type: "POST",
          dataType: "xml",
          success: function(d) {},
          error: function(x, y, z) {
            $('#success-msg').show();
            $('#formfield').hide();
          }
        });


         $.ajax({
          url: "https://docs.google.com/forms/u/0/d/e/1FAIpQLScuE58eMwWb3FmpuHIyq6L4z17vB9ruJDq6ZPJEzf7B8HuOdw/formResponse",
          data: { "entry.84183550": field1, "entry.1158977148": field2, "entry.2092375914": field3, "entry.299049856": field4, "entry.1038437950": field5, "entry.48329758": field6},
          type: "POST",
          dataType: "xml",
          success: function(d) {},
          error: function(x, y, z) {
            $('#success-msg').show();
            $('#formfield').hide();
          }
        });

  
    }
   }

</script>


</body>
</html>