1document.addEventListener('wpcf7submit', function (event) { 2 const failStates = ['validation_failed', 'acceptance_missing', 'spam', 'aborted']; 3 let fail = false; 4 failStates.forEach(state => { 5 if (state === event.detail.status) fail = true; 6 }); 7 if (fail) return; 8 let redirect = false; 9 let stairliftOverride = false; 10 const data = []; 11 const url = 'https://' + location.host; 12 if (!Array.isArray(event.detail.inputs)) return; 13 event.detail.inputs.forEach(input => { 14 if (input.name === "mob-quote-redirect") { 15 redirect = "long"; 16 } 17 else if (input.name === "mob-quote-redirect-thanks") { 18 redirect = "thank"; 19 } 20 else if (input.name === "product-interest" && input.value !== "Stairlift") { 21 data.push(input); 22 stairliftOverride = true; 23 } 24 else { 25 data.push(input); 26 } 27 }); 28 // Always override the redirection choice based on if the user selected 29 // something other than stairlift from the product interest dropdown 30 if (stairliftOverride) redirect = "thank"; 31 if (redirect === "thank") { 32 const longQuoteFormElement = document.querySelector('.shoreline-mob-long-quote'); 33 if (longQuoteFormElement) longQuoteFormElement.style.display = "none"; 34 sessionStorage.removeItem('sl9_mob_short_quote'); 35 window.location = url + '/thanks/'; 36 return; 37 } 38 else if (redirect === "long") { 39 if (event.detail.apiResponse.hasOwnProperty('sl9_mob_sf_id')) { 40 data.push({ 41 name: "lead-id", 42 value: event.detail.apiResponse.sl9_mob_sf_id 43 }); 44 } 45 const dataString = JSON.stringify(data); 46 sessionStorage.setItem('sl9_mob_short_quote', dataString); 47 window.location = url + '/quote/'; 48 return; 49 } 50}, false);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.