PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Global reCAPTCHA Keys on Multi Site

  1. onlybmd
    Member

    I love how we can define a master key for Gravity Forms within the wp-config. My question, would it be possible to do that with reCAPTCHA private and public keys?

    Posted 14 years ago on Friday October 29, 2010 | Permalink
  2. Yep, it's doable. We'll add it to the list & it should make the v1.5 release in a couple of weeks.

    Thanks for the suggestion.

    Posted 14 years ago on Friday October 29, 2010 | Permalink
  3. onlybmd
    Member

    So there is not a way to do this currently? If not, I can wait :) thanks for adding that in!

    Posted 14 years ago on Friday October 29, 2010 | Permalink
  4. Nope, not a way do it currently but it's already been added to the 1.5 release and tested so will be out as soon as we wrap up the rest of the 1.5 features.

    Posted 14 years ago on Friday October 29, 2010 | Permalink
  5. Any update on this? Would love to have this feature for a project I'm currently working on.

    Posted 13 years ago on Wednesday December 29, 2010 | Permalink
  6. This was added to one of the recent 1.5 builds, however I need to check to see what the proper syntax is for adding it to the wp-config.php file. It might be a little bit before I can get back with you on this, the developer who implemented the feature is currently traveling with limited internet access.

    Posted 13 years ago on Wednesday December 29, 2010 | Permalink
  7. Thanks for the update. It would be really handy to have this for me.

    Posted 13 years ago on Wednesday December 29, 2010 | Permalink
  8. The reCAPTCHA keys can be pre-populated by adding the following to your wp-config.php file:

    define('GF_RECAPTCHA_PRIVATE_KEY','YOUR_PRIVATE_KEY_GOES_HERE');
    define('GF_RECAPTCHA_PUBLIC_KEY','YOUR_PUBLIC_KEY_GOES_HERE');

    Please note that these only get applied to new sites activated in multi-site. It won't pre-populate existing sites as it only runs on activation.

    You need to be running the latest 1.5 development release for this to work.

    Posted 13 years ago on Wednesday December 29, 2010 | Permalink
  9. I'm sorry, but how do we define a master key in the wp-config.php file? I don't remember seeing mention of that anywhere, and can't find it when I search the forums here and the documentation.

    Posted 13 years ago on Saturday January 1, 2011 | Permalink
  10. @zatzai:

    define(‘GF_LICENSE_KEY’,'YOUR_KEY_GOES_HERE’);

    from
    http://forum.gravityhelp.com/topic/are-there-global-notification-variables#post-14288

    Posted 13 years ago on Sunday January 2, 2011 | Permalink
  11. Thanks.

    Posted 13 years ago on Sunday January 2, 2011 | Permalink
  12. UWEX
    Member

    @Carl - is there anything I/you/we can do to apply these global recaptcha keys existing sites?
    We have hundreds of sites already, and would *really* like a way to apply the global recaptcha keys to them. :/

    Posted 13 years ago on Friday May 13, 2011 | Permalink
  13. The option to add the keys to the wp-config.php file is only triggered when a new site is created. If you wanted to add it to sites that already exist the only option is to do it manually or to write a SQL script to do it directly in the database by duplicating the appropriate wp_options for each site.

    Posted 13 years ago on Friday May 13, 2011 | Permalink
  14. UWEX
    Member

    I will probably write a plugin to add the option for all sites (will share when done), but I think that if a global key is defined, this part of the form should probably be hidden from the user. I'd like to grant our users the ability to use Re-captcha without 1) exposing our private key to site admins or 2) confusing people with this 'gibberish'

    thanks for the reply

    (also - how does this option get added during site activation if the plugin isn't active? o_O)

    Posted 13 years ago on Friday May 13, 2011 | Permalink
  15. UWEX
    Member

    Actually - it seems that adding the stuff to wp-config works fine when you just activate gravity forms on an existing site. (of course I realized this AFTER i wrote a plugin to update all the sites' options ><)

    Removing those form fields when global wp_config keys are set still seems like a good idea though.

    Posted 13 years ago on Friday May 13, 2011 | Permalink
  16. Any progress on removing this from the end user's view?

    I also don't want to have my private key displayed to all my multi-site users.

    Having them show up as a password field (like you do with the license key) isn't effective either since the source for the page still displays the value.

    Posted 13 years ago on Monday August 22, 2011 | Permalink
  17. We have not removed these from the end users view. But the idea that @UWEX had to hide these when being set globally via the wp_config keys is a good one. We can look at implementing this.

    reCAPTCHA keys aren't super sensitive. The reason why we show them now is so each individual site could use their own keys if they would like. But auto-populating these via the wp_config could be a signal we could use to not display these and only rely on the values passed via the wp_config.

    We will look into this and see how to best handle this.

    Posted 13 years ago on Monday August 22, 2011 | Permalink