We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44363
    • 14 Posts
    Hi I am using login extra with recaptcha option. I tried using recaptchaWidth to reduce the width of the captcha but no luck. Please can anyone guide me through!.

    [[!Register?
    &activationResourceId=`29`
    &activationEmailTpl=`lgnActivateEmailTpl`
    &activationEmailSubject=`Please activate your account!`
    &submittedResourceId=`30`
    &preHooks=`recaptcha`
    &recaptchaWidth=`100`
    &useExtended=`1`
    &validate=`terms:equalTo=^1^`
    &customValidators=`equalTo`
    ]]

    Thanks
    Shivanandan.L
    • I don't think "recaptchaWidth" is a valid property for the Register Snippet...? Unless you've customized it?

      I would try styling the reCaptcha form with CSS (I'm not even sure the reCaptcha API has a width setting, does it?)
        [sepiariver.com] (https://sepiariver.com/)
        • 37210
        • 131 Posts
        Quote from: shivanandan at Aug 23, 2013, 12:29 PM
        Hi I am using login extra with recaptcha option. I tried using recaptchaWidth to reduce the width of the captcha but no luck. Please can anyone guide me through!.

        [[!Register?
        &activationResourceId=`29`
        &activationEmailTpl=`lgnActivateEmailTpl`
        &activationEmailSubject=`Please activate your account!`
        &submittedResourceId=`30`
        &preHooks=`recaptcha`
        &recaptchaWidth=`100`
        &useExtended=`1`
        &validate=`terms:equalTo=^1^`
        &customValidators=`equalTo`
        ]]

        Thanks
        Shivanandan.L

        This two links combined helped me create a responsive reCaptcha form:

        But I was using reCaptcah with the FormIt snippet...not Register..so I don't know if that helps!
          • 44363
          • 14 Posts
          Hello Sepiariver

          Thanks for the quick turnover, If you go through this document http://rtfm.modx.com/extras/revo/login/login.login#Login.Login-UsingreCaptcha
          you will find a section called "Optional Properties (non Login)" with information as follows


          Name Description Default
          recaptchaHeight Can be used to modify the ReCaptcha iframe Height attribute size. 300
          recaptchaTheme Can be used to modify the ReCaptcha theme to 'red', 'white', 'blackglass', 'clean', or others as they are introduced by Google. clean
          recaptchaWidth Can be used to modify the ReCaptcha iframe Width attribute size. 500

          any idea how this can be utilized

          Thanks
          Shivanandan.L


          Quote from: shivanandan at Aug 23, 2013, 12:29 PM
          Hi I am using login extra with recaptcha option. I tried using recaptchaWidth to reduce the width of the captcha but no luck. Please can anyone guide me through!.

          [[!Register?
          &activationResourceId=`29`
          &activationEmailTpl=`lgnActivateEmailTpl`
          &activationEmailSubject=`Please activate your account!`
          &submittedResourceId=`30`
          &preHooks=`recaptcha`
          &recaptchaWidth=`100`
          &useExtended=`1`
          &validate=`terms:equalTo=^1^`
          &customValidators=`equalTo`
          ]]

          Thanks
          Shivanandan.L

          Quote from: sepiariver at Aug 23, 2013, 11:47 PM
          I don't think "recaptchaWidth" is a valid property for the Register Snippet...? Unless you've customized it?

          I would try styling the reCaptcha form with CSS (I'm not even sure the reCaptcha API has a width setting, does it?)
            • 44363
            • 14 Posts
            Hello Sepiariver

            Thanks for the quick turnover, If you go through this document http://rtfm.modx.com/extras/revo/login/login.login#Login.Login-UsingreCaptcha
            you will find a section called "Optional Properties (non Login)" with information as follows


            Name Description Default
            recaptchaHeight Can be used to modify the ReCaptcha iframe Height attribute size. 300
            recaptchaTheme Can be used to modify the ReCaptcha theme to 'red', 'white', 'blackglass', 'clean', or others as they are introduced by Google. clean
            recaptchaWidth Can be used to modify the ReCaptcha iframe Width attribute size. 500

            any idea how this can be utilized

            Thanks
            Shivanandan.L


            Quote from: shivanandan at Aug 23, 2013, 12:29 PM
            Hi I am using login extra with recaptcha option. I tried using recaptchaWidth to reduce the width of the captcha but no luck. Please can anyone guide me through!.

            [[!Register?
            &activationResourceId=`29`
            &activationEmailTpl=`lgnActivateEmailTpl`
            &activationEmailSubject=`Please activate your account!`
            &submittedResourceId=`30`
            &preHooks=`recaptcha`
            &recaptchaWidth=`100`
            &useExtended=`1`
            &validate=`terms:equalTo=^1^`
            &customValidators=`equalTo`
            ]]

            Thanks
            Shivanandan.L

            Quote from: sepiariver at Aug 23, 2013, 11:47 PM
            I don't think "recaptchaWidth" is a valid property for the Register Snippet...? Unless you've customized it?

            I would try styling the reCaptcha form with CSS (I'm not even sure the reCaptcha API has a width setting, does it?)
            • Hi,

              That doc is actually for the Login snippet, not Register. But as it happens I looked at the Register controller and you are right, there are lines in there for recaptchaWidth and Height. So maybe this is a bug. Have you tried values other than `100` ? Also have you tried the snippet call on a Resource using the (empty) template (so nothing else on the page)?

              Quote from: shivanandan at Aug 24, 2013, 05:22 AM
              Hello Sepiariver

              Thanks for the quick turnover, If you go through this document http://rtfm.modx.com/extras/revo/login/login.login#Login.Login-UsingreCaptcha
              you will find a section called "Optional Properties (non Login)" with information as follows


              Name Description Default
              recaptchaHeight Can be used to modify the ReCaptcha iframe Height attribute size. 300
              recaptchaTheme Can be used to modify the ReCaptcha theme to 'red', 'white', 'blackglass', 'clean', or others as they are introduced by Google. clean
              recaptchaWidth Can be used to modify the ReCaptcha iframe Width attribute size. 500

              any idea how this can be utilized

              Thanks
              Shivanandan.L


                [sepiariver.com] (https://sepiariver.com/)
                • 3749
                • 24,544 Posts
                This isn't an answer to your question, but I've found that when using the email double-opt-in version of Register or Subscribe, I never get bots registering, so you may not really need the reCaptcha if you're using that feature.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 44363
                  • 14 Posts
                  Hi,

                  I understand it is not a good practice to change the core files but it seems to work only by doing so. Still the width and height do not have any effect but I managed to change the theme which made the recaptcha appear little smaller.

                  Find the file
                  core/components/login/model/recaptcha/recaptcha.class.php

                  and change RecaptchaOptions the code below

                  return '<script type="text/javascript">var RecaptchaOptions = {"theme":"white","width":900,"height":600,"lang":"en"};</script><script type="text/javascript" src="'. $server . 'challenge?k=' . $this->config[reCaptcha::OPT_PUBLIC_KEY] . $errorpart . '"></script>

                  Thanks
                  Shivanandan.L


                  Quote from: sepiariver at Aug 25, 2013, 02:23 AM
                  Hi,

                  That doc is actually for the Login snippet, not Register. But as it happens I looked at the Register controller and you are right, there are lines in there for recaptchaWidth and Height. So maybe this is a bug. Have you tried values other than `100` ? Also have you tried the snippet call on a Resource using the (empty) template (so nothing else on the page)?

                  Quote from: shivanandan at Aug 24, 2013, 05:22 AM
                  Hello Sepiariver

                  Thanks for the quick turnover, If you go through this document http://rtfm.modx.com/extras/revo/login/login.login#Login.Login-UsingreCaptcha
                  you will find a section called "Optional Properties (non Login)" with information as follows


                  Name Description Default
                  recaptchaHeight Can be used to modify the ReCaptcha iframe Height attribute size. 300
                  recaptchaTheme Can be used to modify the ReCaptcha theme to 'red', 'white', 'blackglass', 'clean', or others as they are introduced by Google. clean
                  recaptchaWidth Can be used to modify the ReCaptcha iframe Width attribute size. 500

                  any idea how this can be utilized

                  Thanks
                  Shivanandan.L


                    • 44363
                    • 14 Posts
                    Hello Bob,

                    Thanks for your answer. I am using double-opt-in version of Register. Henceforth I understand that I dont require recaptcha any more.

                    Thanks
                    Shivanandan.L
                      • 44363
                      • 14 Posts
                      Hi,

                      Thanks for the reference links. It helped me understand that recaptcha can be responsive.

                      Shivanandan.L
                      www.globalweblogics.com