Webinar

Verified Skills, Real Growth: Building Capabilities You Can Prove

Register Now

Book Demo

Verified skills data elevates employee development with AI-powered verification at every stage. From recruiting to performance management to upskilling & reskilling, we ensure you have the right talent across your workforce to lead the innovation chase and meet your strategic goals.

Step 1/2

Meet Sage: A Breakthrough in How We Assess, Verify and Develop Skills.

Learn More
Book-Demo_Sage-img-1

“Workera has created a consistent and unbiased way to measure our workforce.”

Fernando Lucini

// Initialize default values for the IP data var CPcountry = "Not Provided"; var CPstate = "Not Provided"; // Start observing immediately (before fetch finishes) observeForForm(); // Fetch IP information fetch('https://ipwho.is/?output=json') .then(function (response) { return response.json(); }) .then(function (data) { CPcountry = data.country || "Not Provided"; CPstate = data.region || "Not Provided"; console.log("Fetched IP data:", CPcountry, CPstate); // Try populating again in case form already exists tryPopulate(); }) .catch(function (error) { console.error("Error fetching IP information:", error); tryPopulate(); // still try with defaults }); // Function to populate the hidden fields function populateFields(form) { var attempts = 0; var interval = setInterval(function () { var countryField = form.querySelector('input[name="ip_lookup_country"]'); var stateField = form.querySelector('input[name="ip_lookup_state"]'); if (countryField && stateField) { countryField.value = CPcountry; stateField.value = CPstate; console.log("Fields populated:", CPcountry, CPstate); } attempts++; if (attempts > 10) clearInterval(interval); // stop after ~5s }, 500); form.addEventListener("submit", function () { var countryField = form.querySelector('input[name="ip_lookup_country"]'); var stateField = form.querySelector('input[name="ip_lookup_state"]'); if (countryField && stateField) { countryField.value = CPcountry; stateField.value = CPstate; console.log("Fields forced on submit:", CPcountry, CPstate); } }); } // Try populating if form already exists function tryPopulate() { var secondaryForm = document.querySelector('form[id="hsForm_f17427e9-4ba7-4aa4-aeb3-e6bcbe542394"]'); if (secondaryForm) { populateFields(secondaryForm); return true; } return false; } // Function to observe for the secondary form being added to the DOM function observeForForm() { var observer = new MutationObserver(function () { if (tryPopulate()) { console.log("Secondary form detected and population started."); } }); observer.observe(document.body, { childList: true, subtree: true }); }