Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AsheM 3 posts 73 karma points
    1 week ago
    AsheM
    0

    Recaptcha2 not working properly with Forms

    Umbraco version 7.5.4 Forms Version: :"4.4.2"

    I have a form that you fill out the information and hit the submit button and it performs logic to email it to the proper office it needs to go to. I put the recaptcha2 question onto the form and no matter if the field is marked required or not it's still sending out the email. The rest of the fields are marked required and work properly it's just the captcha that is still allowing the post code to run. Does anyone know how to prevent this or have any ideas so I can actually have the captcha work properly? I think the form I'm trying to use it on is a Contour form if that makes a difference.

  • Shaishav Karnani from digitallymedia.com 106 posts 459 karma points
    1 week ago
    Shaishav Karnani from digitallymedia.com
    0

    Hi,

    Does recaptcha 2 is implemented properly in this case? It seems recaptcha 2 is ignored while submitting details and email is sent.

    Have you used a package for Recaptcha 2.0?

  • AsheM 3 posts 73 karma points
    1 week ago
    AsheM
    0

    I was told by support that my version of forms had a bug with the recaptcha so they sent me these files:

    \appcode\ReCaptcha2.cs \AppPlugins\UmbracoForms\Backoffice\Common\FieldTypes\Recaptcha2.html \App_Plugins\UmbracoForms\Images\recaptcha2.png \Views\Partials\Forms\FieldTypes\FieldType.Recaptcha2.cshtml \Views\Partials\Forms\Themes\default\FieldTypes\FieldType.Recaptcha2.cshtml

    The cs file referenced a light and dark theme but Neither I nor the person supporting me had that theme. So I was informed to change it to clean and normal which compiled. I also had to add 'using Umbraco.Forms.Core.Attributes;' to get the cs file to compile. Am I missing files?

  • Shaishav Karnani from digitallymedia.com 106 posts 459 karma points
    1 week ago
    Shaishav Karnani from digitallymedia.com
    0

    You can apply break point at ValidateField methods in ReCaptcha2.cs and then navigate to see how it works. This method executes before saving of records and email process. Once this is successful then only rest of the process is completed. Introspecting this method will fix your issue.

    You have correct set of files but I am not sure if something is missing from ReCaptcha2.cs

    As using Umbraco.Forms.Core.Attributes; is already added in the class.

Please Sign in or register to post replies

Write your reply to:

Draft