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.

remove address countries

  1. Paper Tower
    Member

    Hello,

    I tried to remove countries from the countries list using this code found on the wiki for Gform countries, but it had no effect.

    add_filter("gform_countries", "remove_country");
    function remove_country($countries){
        return array("Brazil", "United States", "Netherlands", "United Kingdom");
    }

    Any suggestions? The end result I'm trying to accomplish is list only the United States and Canada in the dropdown. From other forum posts it didn't seem possible, until I found that wiki page.

    Thanks.

    The form is located on this page:
    http://www.christianfreedom.org/who-we-are/rtp

    http://www.gravityhelp.com/wiki/page/Gform_countries

    Posted 13 years ago on Thursday February 24, 2011 | Permalink
  2. The wiki isn't public yet, so some of the information referenced in it may not work. We haven't launched the wiki yet. So the problem is that filter doesn't exist in the version of Gravity Forms you are using because it is for the final release of Gravity Forms v1.5.

    You can try using the latest development release that is available on the Downloads page (1.5 RC4.2) and it may already exist in that release but I think it was added more recently. That filter won't exist in the current public release. It's a new hook that is in the upcoming 1.5 final release.

    Posted 13 years ago on Thursday February 24, 2011 | Permalink
  3. Paper Tower
    Member

    I thought that might be the case. Do you suspect that will be valid code if I just leave it until updating the upcoming v1.5 final release? Or should I pull it and come back once it's updated?

    Posted 13 years ago on Thursday February 24, 2011 | Permalink
  4. I would keep it and just comment it out and then try it with the final v1.5 release. Thats a brand new filter that was just added so it will be in the final release.

    Posted 13 years ago on Thursday February 24, 2011 | Permalink