March 2025 update for changes to Captcha and redirect settings.
This document will help explain the needed changes to the Web Leads Form that are currently causing issues for customers.
There are 3 main changes that need to be made that will be laid out below. It is recommended that you take the notes for these changes to the person who implements your web development that set up the web leads form so that they can make these changes.
Change 1: New URL for Submission
There is now a new url needed for Submission of the Web Leads Form. Currently you fill find this URL in the code line:
<form id="webleadform" action="https://rainbowtreecare.arborgold.net/ag/jobinformation/webleadsapi/addwithredirect" method="post">
The highlighted portion should be replaced with the following: https://*.arborgold.net/ag/webleads/addlead
--With the *.aborgold.net being replaced by your arborgold site url path
Change 2: Remove reCaptcha information
The second change that is needed is to remove the information for the google Captcha and replace if with your own captcha if you would like to continue to use one. We will no longer be able to host the Captcha in the form – this should be removed and if you would like to proceed with using Captcha you can replace this with your own information.
Sections to remove:
<div class="form-row">
<div class="form-group col-md-6">
<!-- This field must be included in your form -->
<div class="g-recaptcha" data-sitekey="6Lc-pXIaAAAAABJzS3CHGKdi-owovzuuWhzRQa7T" data-size="compact"></div>
</div>
</div>
AND
<script src='https://www.google.com/recaptcha/api.js'></script>
Change 3: Add javascript redirect code
Our new setup uses a different method for redirecting after submission. You will want to add the javascript redirect code listed below:
<script>
document.getElementById("webleadform").addEventListener("submit", async function (e) {
e.preventDefault(); const form = e.target;
const formData = Object.fromEntries(new FormData(this).entries()); try {
const response = await fetch(form.action, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(formData),
}); if (response.ok) {
const redirectUrl = formData.RedirectUrl;
if (redirectUrl) window.location.href = redirectUrl;
} else {
const errorText = await response.text();
alert(`Error submitting form: ${errorText}`);
}
} catch (error) {
console.error("Error submitting form:", error);
alert("A network error occurred. Please try again.");
}
});
</script>
Alternative Option: Download the new template and add in custom formatting
If you would like to go another route, we have added the three changes listed above in the new tempates that are able to be found under Settings > Company Settings > Web Leads. You can refer to this article for a visual of where to find this template. Once downloaded you can add your own recaptcha if you would like, make the adjustments to the formatting of the Web Leads form and then load it to your site.
These templates can also serve as an example of what to remove and what to add to your current templates for the person who is making those updates.