DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Recaptcha V3

Sort:
You are not authorized to post a reply.





New Around Here





    I've got a html form that switches the default form to post to an Act-On form URL.

    <button class=&quot;btn btn-primary&quot; id=&quot;BtnDownload&quot; onclick=&quot;this.form.action=&#39;https://www1.mcs.co.uk/acton/eform/13678/6fef53fe-8abf-4547-8168-151c33d84cf0/d-ext-0003&#39;;&quot; style=&quot;margin-left:15px;&quot; type=&quot;submit&quot;>Submit</button></p>

    This works fine.

     

    Unfortunately, it is getting a lot of spam and I want to add a Google Recaptcha V3 and don't know to to go about it. Adding the google recaptcha client site script will be easy but how will I add the server side script.

    Has anyone any experience of doing this?

     

     






    Veteran Member





      Can you please provide some more details about where and how you're trying to add this?





      Growing Member





        You really only have two options in this case when you are using a third-party such as Acton.

        1.) If acton supports it, you can configure the Recaptcha on their side.
        2.) You can create a custom DNN Extension that will actually accept the form, and validate the Recaptcha, and then send the data on to Acton from the server side.

        However, there isn't any easier way since you need to add code on the server side to handle Recaptcha
        Mitchel Sellers
        Technology Advisory Group Leader
        CEO @ IowaComputerGurus, Inc. a DNN & .NET Solutions Provider
        Technical Blog: MitchelSellers.com





        Veteran Member





          What if you think about what you want to accomplish instead of how?
          You don't want spam. Did you try to create a honeypot? Personally, I use ActionForm for this where I have :
          1. a field that is not visible for humans
          2. if that field is filled with whatever, the submit button is removed with regex in the binding like !=''

          Robots see the field and will try to fill that with their crap and this is the trigger to not show the submit button
          Tjep's digital agencyRegards,
          Tycho de Waard

          Tjep's digital agency
          We just love DNN
          https://www.tjeps.com





          New Around Here





            Thanks for the reply guys.
            There is already a honeypot included in the form which worked for about 12 months but the spammers seem to have realised and are now bypassing.
            Act-On do support a captcha on their form but in this instance we are not using an iframe but we post the values from our html form in DNN to their form and thus we cannot place a Captcha on their form but not on ours. We need to place the Captcha on the DNN side and not on theirs. So my conclusion matches Mitchell's option 2 which is to make a small extension with the form embedded with a Google Recaptcha V3 and then we can handle the server side response from Google.

            Has anyone any sample code on how to handle this in my extension ?





            New Around Here





              I've got a test page here which shows the HTML form before it is posted onto Act-On URL which takes the post values and inserts into the Act-On form and submits into their CRM

              https://www.mcs.co.uk/delme9

              I need to add the Google Recaptcha V3 into this DNN form






              Veteran Member





                It looks like the form you'd like to associate with is built using an HTML module.  All of the examples of integration reCAPTCHA 3 require a server-side processor, which means that you'd probably need to do this by way of a custom module.  I have contact form style module that you could use as a basis for your own contact form module, then integrate reCAPTCHA 3 as you desire.






                Advanced Member





                  I don't know if it is a good solution for you but the Form&List core module has Recaptcha support (don't remember the exact version but I submitted that I think about 1-2 years ago... https://github.com/DNNCom...FormAndList/releases or if you just want a reference to build your own, you can check that example code https://github.com/DNNCom...ndList/pull/22/files

                  If the contact form is super simple, then the core Feedback module also has Recaptcha support, download it here https://github.com/DNNCom...NN.Feedback/releases or reference the code here https://github.com/DNNCom...DNN.Feedback/pull/23 for yet another example
                  You are not authorized to post a reply.

                  These Forums are dedicated to the discussion of DNN Platform.

                  For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                  5. No Flaming or Trolling.
                  6. No Profanity, Racism, or Prejudice.
                  7. Site Moderators have the final word on approving / removing a thread or post or comment.
                  8. English language posting only, please.

                  Would you like to help us?

                  Awesome! Simply post in the forums using the link below and we'll get you started.

                  Get Involved