Adding a Recaptcha to website form not loading properly

James-McKay Posté à 23/10/2020 22:25

hello, i made a contact us form on a webpage and created using a placeholder and adding in the html form information to the "head", when i load it into the website online, it appears fine and look alright however when clicking the recaptcha it just does the loading image but doesnt actually work, how can i get the recaptcha to work properly? is there something in xara thats interfering with the scrips for the captcha

Commentaires

johnebaker Posté à 24/10/2020 13:42

@James-McKay

Hi

. . . . i made a contact us form on a webpage and created using a placeholder and adding in the html form information to the "head", when i load it into the website online . . . .

Did you use the Forms widget 'Wufoo' or create the form and then insert a sourced ReCaptcha code in the <head> section of the page??

Also see this article it may help you diagnose the issue if it is in the setup of the ReCaptcha parameters and keys.

John EB

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 23H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

James-McKay Posté à 24/10/2020 14:18

@James-McKay

Hi

. . . . i made a contact us form on a webpage and created using a placeholder and adding in the html form information to the "head", when i load it into the website online . . . .

Did you use the Forms widget 'Wufoo' or create the form and then insert a sourced ReCaptcha code in the <head> section of the page??

Also see this article it may help you diagnose the issue if it is in the setup of the ReCaptcha parameters and keys.

John EB

Sorry I m ant body not head, and yes I created a placeholder and inserted the code for the form into the body, the form appears alright but when I click the recaptcha on the live version of the page it clicks but shows the spinning animation, but keeps spinning and just never stops unless I refresh the page, which then I have to click the captcha again.....which then starts and endless cycle,

 

After running a few tests it seems like it's being affected by the roe.js that is generated by xara,

 

So far I've made a work around by creating a seperate file altogether with the form and captcha and then inserting code to embed that other form in an iframe inside the placeholder, which seems to work as now nothing is interfering with eachother.

 

 

johnebaker Posté à 25/10/2020 15:39

@James-McKay

Hi

. . . . After running a few tests it seems like it's being affected by the roe.js that is generated by xara, . . . .

The issue is most likely caused by something in the code you are inserting into the placeholder that WDP does not like whereas using an iFrame, WDP does not care what is in the embeded web page.

Where did you get the code from or what is the code you are using (minus any keys or personal information)?

John EB

 

Dernière modification de johnebaker le 25/10/2020, 15:41, Modifié 1 fois au total.

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 23H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

James-McKay Posté à 29/10/2020 20:19

....The issue is most likely caused by something in the code you are inserting into the placeholder that WDP does not like whereas using an iFrame, WDP does not care what is in the embeded web page.

Where did you get the code from or what is the code you are using (minus any keys or personal information)?.....

 

The Code i Inserted into the place holder is as follows:

<body>


<div class="container">
  <form action="/action_page.php">
    <label for="fname">First Name</label>
    <input type="text" id="fname" name="firstname" placeholder="Your name..">

    <label for="lname">Last Name</label>
    <input type="text" id="lname" name="lastname" placeholder="Your last name..">

    <label for="email">Last Name</label>
    <input type="text" id="email" name="email" placeholder="Your Email Address..">

    <label for="subject">Subject</label>
    <textarea id="subject" name="subject" placeholder="Write something.." style="height:200px"></textarea>
    <div class="g-recaptcha" data-sitekey="Removed by Moderator"></div>
    <input type="submit" value="Submit">
  </form>
</div>

</body>

 

other than the captcha the form works fine,

 

johnebaker Posté à 30/10/2020 18:30

@James-McKay

Hi

Did you include the <body> ... </body> tags as well?

If so they are not necessary when entered into a Placeholder directly and are likely what was causing the issue as the placeholder is already inside the web pages <body> ... </body>. There can only be 1 pair of <head> ... </head> and <body> ... </body> tags per web page.

This would be why the iFrame version works - it is a complete web page in its own right.

BTW - I have removed the site key from your post.

HTH

John EB

Dernière modification de johnebaker le 30/10/2020, 18:30, Modifié 1 fois au total.

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 23H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.