People Group Profile – JS ArcGIS map for PG polygon – shortcode for map

document.addEventListener(“DOMContentLoaded”, function () { var mapInitialized = false; function initMap() { if (mapInitialized) return; mapInitialized = true; var mapDiv = document.getElementById(“pg-map”); if (!mapDiv) return; var peid = parseInt(mapDiv.getAttribute(“data-peid”), 10); if (!peid) return; var map = new maplibregl.Map({ container: “pg-map”, style:…Continue reading

Admin Area—Prevent Mouse Scroll Changing Number Inputs

function preventNumberScroll(e) { if (e.target.matches(‘input[type=”number”]’) || e.target.closest(‘input[type=”number”]’)) { e.preventDefault(); } } document.addEventListener(‘wheel’, preventNumberScroll, { passive: false, capture: true }); document.addEventListener(‘mousewheel’, preventNumberScroll, { passive: false, capture: true }); document.addEventListener(‘DOMMouseScroll’, preventNumberScroll, { passive: false, capture: true });Continue reading

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