Modal Conditional Logic Unhide Javascript

jQuery(document).on(‘shown.bs.modal’, function() { if (typeof frmFrontForm !== ‘undefined’) { // Wait 200ms for modal animation to finish setTimeout(function() { frmFrontForm.init(); // This loop finds every Formidable form in the modal automatically jQuery(‘.frm_forms’).each(function() { var formId = jQuery(this).find(‘input[name=”form_id”]’).val(); if (formId) {…Continue reading

Forms | Business email validation

(function(){ var BLOCKED = new Set([ ‘gmail.com’,’googlemail.com’,’yahoo.com’,’ymail.com’,’rocketmail.com’, ‘hotmail.com’,’outlook.com’,’live.com’,’msn.com’, ‘icloud.com’,’me.com’,’mac.com’, ‘aol.com’,’aim.com’, ‘proton.me’,’protonmail.com’, ‘yandex.com’,’mail.com’,’zoho.com’,’gmx.com’,’fastmail.com’,’yumobiz.com’ ]); function domainOf(v){ var at = (v||”).lastIndexOf(‘@’); return at>-1 ? v.slice(at+1).toLowerCase().trim() : ”; } function invalid(input){ return BLOCKED.has(domainOf(input.value||”)); } function setErr(input){ var field = input.closest(‘.gfield’); if (!field) return;…Continue reading

Replace BigPost Checkout Postcode Field Description

(function () { var rdBigPostHelpText = ‘Enter your postcode in the field above to load available suburbs. Once loaded,’ + ‘ select the suburb-postcode combination from the list below.’; // Customise Postcode field description text here. var rdObserverStarted = false;…Continue reading

RED Chatbot Script

document.addEventListener(“DOMContentLoaded”, function () { console.log(“✅ Script running”); // 🔥 REMOVE CALL/TEXT BUTTONS setTimeout(function () { document.querySelectorAll(‘a[href^=”tel:”], a[href^=”sms:”]’).forEach(el => el.remove()); }, 1500); });Continue reading

RED’S Java Snippet

fetch(“https://redllc.ai/wp-json/chaport/v1/lead”, { method: “POST”, headers: { “Content-Type”: “application/json” }, body: JSON.stringify(payload) }) .then(res => res.json()) .then(data => { console.log(“Webhook response:”, data); }) .catch(err => { console.error(“Error:”, err); });Continue reading

New Window

function addNoOpener(link) { var linkTypes = (link.getAttribute(‘rel’) || ”).split(‘ ‘); if (linkTypes.indexOf(‘noopener’) === -1) { linkTypes.push(‘noopener’); } link.setAttribute(‘rel’, linkTypes.join(‘ ‘).trim()); } function addNewTabMessage(link) { if (!link.querySelector(‘.sr-only’)) { link.insertAdjacentHTML(‘beforeend’, ‘(opens in a new tab)‘); } } function isA2ALink(link) { var href…Continue reading