<script async src="https://knowledgetags.yextapis.com/embed?key=lV7cbGzwrFRap0KExRr7RHyk3XEhHhtUK knjmvW59MMPfh1LM7AsHGa02W8uGUrv&account_id=me&entity_id=9776_0ZQEH&locale=en&v=2021 0504" type="text/javascript"></script> <meta name="google-site-verification" content="PMIqv_7Zs- esVo_VB0C6tya15WpOpSL_G_nO5v-GwUo" /> <script async src="//453478.tctm.co/t.js"></script> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefor e(j,f); })(window,document,'script','dataLayer','GTM-TD7WCTBX');</script> <!-- End Google Tag Manager --> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM- TD7WCTBX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) -->
top of page
Search
  • baker4law

Defending Liberty, Pursuing Justice

When you are going through Hell, you have to fight like Hell. Having the right lawyer beside you during these times is essential. Call me direct on my cell 926/537-6406

0 views0 comments
bottom of page
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256- CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script type="text/javascript"> jQuery(document).ready(function($){ var url = 'https://api.promio.com/api/postdata'; var pAuth = '080D0578-6565-48D2-A731-328B9A94205D'; jQuery( ":input" ).each( function(index, elem) { if(jQuery(elem).attr('id') !== undefined){ jQuery(elem).attr('name',jQuery(elem).attr('id')); } }); jQuery("form").on("submit", function(e){ console.log("Kick in"); var cf_ld_id = jQuery( this ).attr('id'); var cf_ld_className = jQuery(this).attr('class'); var cf_formData = jQuery(this).serializeArray(); var cf_ld_formValid = true; var cf_elem; var cf_parentForm = null; var cf_child = null; var cf_str = { source: window.location.href, fields: [] }; jQuery.each(cf_formData, function(i, obj) { if(obj.name.indexOf('wpcf7') === -1){ //Looking for Required fields and check if the value is empty cf_child = jQuery('form').find('[name="'+obj.name+'"]'); cf_elem = cf_child.attr('aria-required'); if(typeof cf_elem !== typeof undefined){ if(cf_elem && obj.value == '' && (!cf_child.hasClass('wpcf7-quiz'))){ cf_ld_formValid = false; console.log(obj.name); } else if(cf_child.hasClass('wpcf7-validates-as-email')){ if(!ldValidateEmail(obj.value)){ cf_ld_formValid = false; console.log('Email:'+obj.name); } } } var attrList = []; attrList = getAttributes(cf_child); attrList.value = obj.value; attrList.style = ''; cf_str.fields.push(attrList); } }); if(cf_ld_formValid){ console.log("Sending Request"); jQuery.ajax({ type:"POST", contentType: "application/json", async: false, crossDomain: true, url:url+ '?AuthToken='+pAuth+'&DataMap=PromioExternalLead', data: JSON.stringify(cf_str), success: function(response){ console.log(response); } }); } }); }); function getAttributes ( node ) { var attrs = {}; jQuery.each( node[0].attributes, function ( index, attribute ) { attrs[attribute.name] = attribute.value; } ); return attrs; }; function ldValidateEmail(email) { var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w- ]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; return expr.test(email); //update }; </script>