Racaptcha value empty [closed]

I have spent more than two days trying to solve this issue, but I still can’t get the reCAPTCHA value to return properly in my form. Interestingly, when I log the field using console.log, it does return the value. Additionally, it’s worth noting that the form spans across two pages

provide the solution