Copied to clipboard

Flag this post as spam?

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


  • JME 14 posts 61 karma points
    Jan 29, 2015 @ 18:40
    JME
    0

    Problem editing ReCaptcha field using Fieldtype.Recaptch.cshtml

    I need to add custom code to the IFrame tag in the NoScript tag of the generated recaptcha  (see the recaptcha source code generated on my form in the code snipped below)  Accessibility software flags the IFrame tag as failing because there is no content between the tags.  I want to put "Please complete the Captcha form" between the IFrame tags so I pulled up the fieldtype.Recaptcha.cshtml file expecting to see the IFrame tags so that I could make my update.  Instead the code reads:

    Code from fieldtype.Recaptcha.cshtml:

    @using Umbraco.Forms.Mvc.Helpers
    @model Umbraco.Forms.Mvc.Models.FieldViewModel
    @ReCaptchaHelper.ReCaptcha(Model.AdditionalSettings.FirstOrDefault(x => x.Key == "Theme").Value)

     

    I am assuming the ReCaptchaHelper is creating the default reCaptcha code.  How can I add the plain text "Please complete the Captcha form" between the IFrame tags it creates.

     

    Code Snippet showing the generated reCaptcha code from Contour:

    <label for="7e0a48f9-ffc1-4377-bd25-bb8ba2abd703" class="fieldLabel">Please enter the characters you see: </label> <div><script type="text/javascript">
      var RecaptchaOptions = {
      theme : '',
      tabindex : 0
      };
     
      </script><script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k=6LeqoNsSAAAAAOQrdqDFE5KAzDESxxxODLpOeJjh&hl=&;">
     
      </script><noscript>
      <iframe src="https://www.google.com/recaptcha/api/noscript?k=6LeqoNsSAAAAAOQrdqDFE5KAzDESxxxODLpOeJjh&hl=&" width="500" height="300" frameborder="0">
     
      </iframe><br /><textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea><input name="recaptcha_response_field" value="manual_challenge" type="hidden" />
      </noscript>
Please Sign in or register to post replies

Write your reply to:

Draft