ArchiveMEK LEARNING CIRCLES

[vc_row css_animation="" row_type="row" use_row_as_full_screen_section="no" type="grid" angled_section="no" text_align="left" background_image_as_pattern="without_pattern" background_color="rgba(255,255,255,0.01)" z_index="" el_id="banner-icon" css=".vc_custom_1548059840205{margin-top: -50px !important;background-color: rgba(0,0,0,0) !important;*background-color: rgb(0,0,0) !important;}"][vc_column width="5/6" offset="vc_col-lg-offset-3 vc_col-lg-6 vc_col-md-offset-2 vc_col-md-8 vc_col-sm-offset-1"][vc_row_inner row_type="row" type="full_width" text_align="left" side_padding="7" css_animation=""][vc_column_inner width="1/3"][icon_text box_type="normal" icon_pack="dripicons" dripicon="dripicons-lock" icon_type="circle" icon_position="top" icon_size="fa-2x" use_custom_icon_size="yes" custom_icon_size="48" custom_icon_size_inner="30" title="GRADES 4-8" title_tag="h6" title_font_weight="700" separator="no" icon_background_color="#ffffff"...

[vc_row css_animation="" row_type="row" use_row_as_full_screen_section="no" type="grid" angled_section="no" text_align="left" background_image_as_pattern="without_pattern" background_color="rgba(255,255,255,0.01)" z_index="" el_id="banner-icon" css=".vc_custom_1548059840205{margin-top: -50px !important;background-color: rgba(0,0,0,0) !important;*background-color: rgb(0,0,0) !important;}"][vc_column width="5/6" offset="vc_col-lg-offset-3 vc_col-lg-6 vc_col-md-offset-2 vc_col-md-8 vc_col-sm-offset-1"][vc_row_inner row_type="row" type="full_width" text_align="left" side_padding="7" css_animation=""][vc_column_inner width="1/3"][icon_text box_type="normal" icon_pack="dripicons" dripicon="dripicons-lock" icon_type="circle" icon_position="top" icon_size="fa-2x" use_custom_icon_size="yes" custom_icon_size="48" custom_icon_size_inner="30" title="GRADES 4-8" title_tag="h6" title_font_weight="700" separator="no" icon_background_color="#ffffff"...

var interval = setInterval(findForm, 100); var startTime = new Date().getTime(); function formatPhoneNumber(value) { if (!value) return value; const phoneNumber = value.replace("+1", "").replace(/[^\d]/g, ''); const phoneNumberLength = phoneNumber.length; if (phoneNumberLength < 4) return phoneNumber; if (phoneNumberLength < 7) { return `+1 (${phoneNumber.slice(0, 3)}) ${phoneNumber.slice(3)}`; } return `+1 (${phoneNumber.slice(0, 3)}) ${phoneNumber.slice( 3, 6 )}-${phoneNumber.slice(6, 10)}`; } function validatePhoneNumber(input_str) { var re = /^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/; return re.test(input_str); } function convertPhoneToUSA(form) { var phoneNumberInput = form.querySelector('[data-name="phone_number"]'); phoneNumberInput.addEventListener('input', function(){ this.value = formatPhoneNumber(this.value); }) } function findForm() { var form = document.getElementsByClassName('_form_84')[0] || document.getElementsByClassName('_form_96')[0] || document.getElementsByClassName('_form_88')[0]; if (form) { convertPhoneToUSA(form); clearInterval(interval) } else { if(new Date().getTime() - startTime > 6000){ console.log("form not found"); clearInterval(interval); return; } } }