const element2 = document.getElementById('website_url'); const url_key = element2.dataset.key; const brochure_request_url = `${url_key}/send_mail/brochure_request`; const element3 = document.getElementById('instance_name'); const instance = element3.dataset.key; function submitBrochureForm(form_type,konectar_instance){ if(!$(`#requestBr${form_type}`).validate({ rules: { full_name: { required: true, minlength: 2, maxlength: 250 }, business_email: { required: true, email: true } }, messages: { full_name: { required: "Please enter your name", minlength: "Your name must consist of at least 2 characters", maxlength: "Your name must consist of maximum 250 characters" }, business_email: "Please enter a valid email address" } }).form()){ return false; }else{ var data = {};//$("#requestBr1").serialize(); data["full_name"] = $(`#full_name${form_type}`).val(); data["business_email"] = $(`#business_email${form_type}`).val(); data["brochure_request_type"] = $(`#brochure_request_type${form_type}`).val(); data['requested_type']=konectar_instance; // document.write(data["full_name"],data["business_email"],data["brochure_request_type"],data['requested_type']); $.ajax({ url: brochure_request_url, type:"post", dataType:"json", data: data, beforeSend: function() { $('#requestFormSubmit').val('Requesting'); }, success: function(retData){ if(retData.status = 'true'){ $(`#requestBr${form_type}`).hide(); $(".messageDiv").html('

Thank you!

We will email you shortly.

'); } } }); } } function form_content(form_type,instance) { return `
`; } $(document).ready(function(e) { window.innerWidth >= 768 && window.innerWidth <= 991 ? (e("#reqstForm1").webuiPopover({ dismissible: !1, closeable: !0, title: "", type: "html", cache: !1, // url: base_url + "/konectar/get_form/1/" + method, content: form_content('1',instance), placement: "left", width: "250px", height: "172px" }), e("#reqstForm2").webuiPopover({ dismissible: !1, closeable: !0, title: "", type: "html", cache: !1, content: form_content('2',instance), placement: "left", width: "250px", height: "172px" }), e("#reqstForm3").webuiPopover({ dismissible: !1, closeable: !0, title: "", type: "html", cache: !1, content: form_content('3',instance), placement: "left", width: "250px", height: "172px" })) : (e("#reqstForm1").webuiPopover({ dismissible: !1, closeable: !0, title: "", type: "html", cache: !1, content: form_content('1',instance), placement: "top", width: "250px", height: "172px" }), e("#reqstForm2").webuiPopover({ dismissible: !1, closeable: !0, title: "", type: "html", cache: !1, content: form_content('2',instance), placement: "top", width: "250px", height: "172px" }), e("#reqstForm3").webuiPopover({ dismissible: !1, closeable: !0, title: "", type: "html", cache: !1, content: form_content('3',instance), placement: "top", width: "250px", height: "172px" })), e(window).scroll(function() { e(".hideme").each(function(t) { var s = e(this).offset().top + e(this).outerHeight(); e(window).scrollTop() + e(window).height() > s && e(this).addClass("showme animated fadeInUp") }) }) }) , 767 > $(window).width() ? ($("#carousel-slider").addClass("carousel carousel-dark slide").attr("data-bs-ride", "carousel"), $("#carousel-slider-inner").removeClass("carousel-desktop"), $(".carousel-nav-button").show()) : ($("#carousel-slider").removeClass("carousel carousel-dark slide").attr("data-bs-ride", ""), $("#carousel-slider-inner").addClass("carousel-desktop"), $(".carousel-nav-button").hide());