        <script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
        <script src="https://apis.google.com/js/api.js"></script>

          <!-- <div class="row g-3">
                                <div class="col-sm-6">
                                    <div class="form-floating">
                                        <input type="text" class="form-control border-0 bg-light" id="name" placeholder="Your Name">
                                        <label for="name">Your Name</label>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-floating">
                                        <input type="email" class="form-control border-0 bg-light" id="mail" placeholder="Your Email">
                                        <label for="mail">Your Email</label>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-floating">
                                        <input type="text" class="form-control border-0 bg-light" id="mobile" placeholder="Your Mobile">
                                        <label for="mobile">Your Mobile</label>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-floating">
                                        <input type="text" class="form-control border-0 bg-light" id="subject" placeholder="Subject">
                                        <label for="subject">Subject</label>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-floating">
                                        <textarea class="form-control border-0 bg-light" placeholder="Leave a message here" id="message"
                                            style="height: 130px"></textarea>
                                        <label for="message">Message</label>
                                    </div>
                                </div>
                                <div class="col-12 text-center">
                                    <button class="btn btn-primary w-100 py-3" type="submit">Submit Now</button>
                                </div>
                            </div>
                            
                            -->
<div id="mauticform_wrapper_contactformpimolding" class="mauticform_wrapper">
    <form autocomplete="false" role="form" method="post" action="https://sas.emuaj.in/form/submit?formId=55" id="mauticform_contactformpimolding" data-mautic-form="contactformpimolding" enctype="multipart/form-data">
        <div class="mauticform-error" id="mauticform_contactformpimolding_error"></div>
        <div class="mauticform-message" id="mauticform_contactformpimolding_message"></div>
        <div class="mauticform-innerform">

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

            <div id="mauticform_contactformpimolding_f_name" data-validate="f_name" data-validation-type="text" class="mauticform-row mauticform-text mauticform-field-1 mauticform-required">
                <input id="mauticform_input_contactformpimolding_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_contactformpimolding_phone" data-validate="phone" data-validation-type="text" class="mauticform-row mauticform-text mauticform-field-2 mauticform-required">
                <input id="mauticform_input_contactformpimolding_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_contactformpimolding_email" class="mauticform-row mauticform-email mauticform-field-3">
                <input id="mauticform_input_contactformpimolding_email" name="mauticform[email]" value="" placeholder="Email" class="mauticform-input" type="email">
                <span class="mauticform-errormsg" style="display: none;"></span>
            </div>

            <div id="mauticform_contactformpimolding_f_message" class="mauticform-row mauticform-text mauticform-field-4">
                <textarea id="mauticform_input_contactformpimolding_f_message" name="mauticform[f_message]" placeholder="Requirement" class="mauticform-textarea"></textarea>
                <span class="mauticform-errormsg" style="display: none;"></span>
            </div>

                <input id="mauticform_input_contactformpimolding_lead_source" name="mauticform[lead_source]" value="https://www.plastic-injectionmolding.com/" class="mauticform-hidden" type="hidden">
            <div id="mauticform_contactformpimolding_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_contactformpimolding_yes_i_am_interested_to_di" value="" style="width:100%;background-color: #f17804;   border: none;   color: white;     text-align: center;   text-decoration: none;   display: inline-block;   font-size: 20px;   margin: 4px 2px;padding:8px 20px  ; cursor: pointer;" class="mauticform-button">Yes, Let's Discuss Further!</button>
            </div>
            </div>
        </div>

        <input type="hidden" name="mauticform[formId]" id="mauticform_contactformpimolding_id" value="55">
        <input type="hidden" name="mauticform[return]" id="mauticform_contactformpimolding_return" value="">
        <input type="hidden" name="mauticform[formName]" id="mauticform_contactformpimolding_name" value="contactformpimolding">

        </form>
</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_contactformpimolding_yes_i_am_interested_to_di').click(function(){
             contactForm();
			 
          });
      });  
</script>

<script>
function contactForm()
    {
        var url = window.location.href.split('#')[0];
        var field1 = $("#mauticform_input_contactformpimolding_f_name").val();
        var field2 = $("#mauticform_input_contactformpimolding_phone").val();
        var field3 = $("#mauticform_input_contactformpimolding_email").val();
        var field4 = $("#mauticform_input_contactformpimolding_f_message").val();
	//	var field5 = $("#mauticform_input_contactformpimolding_lead_source").val();
	var field5 =url + ' + Conact';
        	
		   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/d/e/1FAIpQLScDCOdedydrCv-09srV15lAqR1-InsY5Eaogz-Lt4yWqATrgQ/formResponse",
    data: {"entry.1902069042": field1, "entry.941969064": field2, "entry.1510698678": field3, "entry.751273144": field4,"entry.1588330093": field5},
          
//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},

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

</script>

         

