illustration

Coming Soon

New WordPress website is being built and will be published soon

/* HEIRLOOM SOCIETY — Register page: pre-select the Sector field from a ?sector= URL parameter sent by the Pathfinder quiz. Install: WPCode → Add New → JavaScript Snippet → paste this whole file. Insertion: Auto Insert, Location: restrict to the Register page only (WPCode's "Insert Location" → "Page Specific" and select page 362, or use Smart Conditional Logic → Page → is → Register). */ (function () { function preselectSector() { var params = new URLSearchParams(window.location.search); var value = params.get("sector"); if (!value) return; // Profile Builder select fields are usually name="sector" (meta-name // lowercased), but this checks both cases so it works either way. var select = document.querySelector('select[name="sector"], select[name="Sector"]'); if (!select) return; // Case-insensitive match against the option's actual value. for (var i = 0; i < select.options.length; i++) { if (select.options[i].value.toLowerCase() === value.toLowerCase()) { select.value = select.options[i].value; break; } } // Fire a change event in case Profile Builder has any validation // or conditional logic listening for it. select.dispatchEvent(new Event("change", { bubbles: true })); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", preselectSector); } else { preselectSector(); } })();