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.

override predefined countries

  1. I have an address field, and I'd like to change the list of countries presented on the form. I couldn't find a hook in the documentation for this.

    I found gform_predefined_choices filter but couldn't get it to fire and not even sure if it's what I want.

    I tried:

    add_filter("gform_predefined_choices", "ec_add_predefined_country");
    function ec_add_predefined_country($choices)
    {
    
    	$choices['Countries'] = array('US', 'CA');
    
    	return $choices;
    
    }

    Thanks!

    Posted 12 years ago on Wednesday January 11, 2012 | Permalink