   <div id="mauticform_wrapper_wholesaleformpimolding" class="mauticform_wrapper">
    <form autocomplete="false" role="form" method="post" action="https://sas.emuaj.in/form/submit?formId=51" id="mauticform_wholesaleformpimolding" data-mautic-form="wholesaleformpimolding" enctype="multipart/form-data">
        <div class="mauticform-error" id="mauticform_wholesaleformpimolding_error"></div>
        <div class="mauticform-message" id="mauticform_wholesaleformpimolding_message"></div>
        <div class="mauticform-innerform">

            
          <div class="mauticform-page-wrapper mauticform-page-1" data-mautic-form-page="1">

            <div id="mauticform_wholesaleformpimolding_f_name" data-validate="f_name" data-validation-type="text" class="mauticform-row mauticform-text mauticform-field-1 mauticform-required">
                <input id="mauticform_input_wholesaleformpimolding_f_name" name="mauticform[f_name]" value="" placeholder="Name*" class="mauticform-input" type="text">
                <span class="mauticform-errormsg" style="display: none;">This is required</span>
            </div>

            <div id="mauticform_wholesaleformpimolding_phone" data-validate="phone" data-validation-type="text" class="mauticform-row mauticform-text mauticform-field-2 mauticform-required">
                <input id="mauticform_input_wholesaleformpimolding_phone" name="mauticform[phone]" value="" placeholder="Phone*" class="mauticform-input" type="text">
                <span class="mauticform-errormsg" style="display: none;">This is required</span>
            </div>

            <div id="mauticform_wholesaleformpimolding_email" data-validate="email" data-validation-type="text" class="mauticform-row mauticform-text mauticform-field-3 mauticform-required">
                <input id="mauticform_input_wholesaleformpimolding_email" name="mauticform[email]" value="" placeholder="Email" class="mauticform-input" type="text">
               <!-- <span class="mauticform-errormsg" style="display: none;">This is required</span>-->
            </div>

            <div id="mauticform_wholesaleformpimolding_f_message" data-validate="f_message" data-validation-type="textarea" class="mauticform-row mauticform-text mauticform-field-4 mauticform-required">
                <textarea id="mauticform_input_wholesaleformpimolding_f_message" name="mauticform[f_message]" placeholder="Requirement" class="mauticform-textarea"></textarea>
               <!-- <span class="mauticform-errormsg" style="display: none;">This is required</span>-->
            </div>

                <input id="mauticform_input_wholesaleformpimolding_lead_source" name="mauticform[lead_source]" value="https://www.plastic-injectionmolding.com/" class="mauticform-hidden" type="hidden">
            <div id="mauticform_wholesaleformpimolding_yes_i_am_interested_to_di" class="mauticform-row mauticform-button-wrapper mauticform-field-6">
                <button type="submit" name="mauticform[yes_i_am_interested_to_di]" id="mauticform_input_wholesaleformpimolding_yes_i_am_interested_to_di" value="" style="background-color: #ce9233;   border: none;   color: white;     text-align: center;   text-decoration: none;   display: inline-block;   font-size: 16px;   margin: 4px 2px;   cursor: pointer;width: 100%;
    padding: 7px 2px; " class="mauticform-button">Get Quote</button>
            </div>
            </div>
        </div>

        <input type="hidden" name="mauticform[formId]" id="mauticform_wholesaleformpimolding_id" value="51">
        <input type="hidden" name="mauticform[return]" id="mauticform_wholesaleformpimolding_return" value="">
        <input type="hidden" name="mauticform[formName]" id="mauticform_wholesaleformpimolding_name" value="wholesaleformpimolding">

        </form>
</div>

		   
</div>
</div>

<script>
    var url = window.location.href; 
    /*$(document).ready(function(){
          $('#mauticform_input_rubberformws_lead_source').append("<option value='"+url+" + Whole Sale' selected> Whole Sale</option>");
    }); */
   
      $(document).ready(function(){
          $('#mauticform_input_wholesaleformpimolding_yes_i_am_interested_to_di').click(function(){
             wholeSale();
          });
      });  
</script>

<script>
function wholeSale()
    {
        var url = window.location.href.split('#')[0]; 
        var field1 = $("#mauticform_input_wholesaleformpimolding_f_name").val();
        var field2 = $("#mauticform_input_wholesaleformpimolding_phone").val();
        var field3 = $("#mauticform_input_wholesaleformpimolding_email").val();
        var field4 = $("#mauticform_input_wholesaleformpimolding_f_message").val();
	//	var field5 = $("#mauticform_input_wholesaleformpimolding_lead_source").val();
	    var field5 =url + ' + Get Quote';
		
		   if (!field1 || !field2) {
        // Show error message if any field is empty
        alert("Please Fill Mandatory Fields.");
        return false;  // Prevent form submission
         }

              
       else{         
        $.ajax({
 //    url: "https://docs.google.com/forms/u/0/d/e/1FAIpQLSdP-DZd5DGZM38TZtUKrFRBuh5vDmVsXZAudx51wtLlNXI-5g/formResponse",
 //   data: {"entry.1251720729": field1, "entry.746654238": field2, "entry.574360142": field3, "entry.634609468": field4, "entry.1533748469": field5},
          
   url: "https://docs.google.com/forms/d/e/1FAIpQLScDCOdedydrCv-09srV15lAqR1-InsY5Eaogz-Lt4yWqATrgQ/formResponse",
  data: {"entry.1902069042": field1, "entry.941969064": field2, "entry.1510698678": field3, "entry.751273144": field4,"entry.1588330093": field5},
          

            type: "POST",
            dataType: "xml",
            success: function(d)
            {
            },
            error: function(x, y, z)
                {
                    $('#success-msg').show();
                    $('#formfield').hide();
                }
          });
        }
    }

</script>