<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Change Country Value within Address Input (IE use US instead of United States)</title>
		<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states</link>
		<description>Gravity Support Forums Topic: Change Country Value within Address Input (IE use US instead of United States)</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 16:23:25 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states" rel="self" type="application/rss+xml" />

		<item>
			<title>espo_74 on "Change Country Value within Address Input (IE use US instead of United States)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states#post-62681</link>
			<pubDate>Fri, 15 Jun 2012 11:12:58 +0000</pubDate>
			<dc:creator>espo_74</dc:creator>
			<guid isPermaLink="false">62681@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Making Progress--for anyone else trying to do something similar I have the drop down value now being grabbed then changed and displayed in a field:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_render_4&#38;quot;, &#38;quot;monitor_dropdown&#38;quot;);
function monitor_dropdown($form){

?&#38;gt;
    &#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
    jQuery(document).ready(function(){

        jQuery(&#38;#39;#input_4_40&#38;#39;).bind(&#38;#39;change&#38;#39;, function()
        {
            //get selected value from drop down;
            var selectedValue = jQuery(&#38;quot;#input_4_40&#38;quot;).val();

jQuery(&#38;quot;#input_4_40&#38;quot;).children(&#38;quot;option&#38;quot;).each(function(){
    var newVal = jQuery(this).val();
    switch(jQuery(this).val()){
        case &#38;quot;236&#38;quot; : newVal = &#38;quot;8&#38;quot;;
        break;

        case &#38;quot;237&#38;quot; : newVal = &#38;quot;8&#38;quot;;
        break;

        break;
    }
    jQuery(this).val(newVal);

});

            //populate a text field with the selected drop down value
            jQuery(&#38;quot;#input_4_61&#38;quot;).val(selectedValue);

        });
    });
    &#38;lt;/script&#38;gt;
&#38;lt;?php

return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>espo_74 on "Change Country Value within Address Input (IE use US instead of United States)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states#post-62668</link>
			<pubDate>Fri, 15 Jun 2012 10:25:06 +0000</pubDate>
			<dc:creator>espo_74</dc:creator>
			<guid isPermaLink="false">62668@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks Alex. I am working through this but please excuse my lack of experience with these couple of questions:&#60;/p&#62;
&#60;p&#62;case &#34;Brazil&#34;  would brazil be the Label of Value we are looking to replace&#60;br /&#62;
(i am assuming it is the value)&#60;/p&#62;
&#60;p&#62;would this code need to be put into pre_submission or something along those lines in order for it to run? I have it being added as script to that specific page not as a part of functions.php but the values still show up as the default values from the drop down (populated with a taxonomy)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Change Country Value within Address Input (IE use US instead of United States)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states#post-62604</link>
			<pubDate>Thu, 14 Jun 2012 13:50:20 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">62604@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Here is a code snippet to update the value of a couple of countries in an address field.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
//NOTE: replace input_157_4_6 with your actual input ID (inspect the markup/page source to find out what your ID is)
jQuery(&#38;quot;#input_157_4_6&#38;quot;).children(&#38;quot;option&#38;quot;).each(function(){
    var newVal = jQuery(this).val();
    switch(jQuery(this).val()){
        case &#38;quot;Brazil&#38;quot; :
            newVal = &#38;quot;BR&#38;quot;;
        break;

        case &#38;quot;United States&#38;quot; :
            newVal = &#38;quot;US&#38;quot;;
        break;
    }
    jQuery(this).val(newVal);
});

&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>espo_74 on "Change Country Value within Address Input (IE use US instead of United States)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states#post-62597</link>
			<pubDate>Thu, 14 Jun 2012 13:38:20 +0000</pubDate>
			<dc:creator>espo_74</dc:creator>
			<guid isPermaLink="false">62597@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Alex,  do you have an example of how to replace the value? I am looking to do this for a drop down populated with a taxonomy.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Change Country Value within Address Input (IE use US instead of United States)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states#post-62592</link>
			<pubDate>Thu, 14 Jun 2012 13:34:50 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">62592@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello Aaron,&#60;br /&#62;
Unfortunately, we don't a &#34;hidden gem&#34; that allows you to specify different values for the country field choices. One alternative is use jQuery to replace the values on the client side.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Aaron Ware on "Change Country Value within Address Input (IE use US instead of United States)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states#post-62412</link>
			<pubDate>Wed, 13 Jun 2012 11:14:49 +0000</pubDate>
			<dc:creator>Aaron Ware</dc:creator>
			<guid isPermaLink="false">62412@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the reply Rob. Hmm it looks like he was importing his own fields. In the current scenario we are utilizing the Advanced Address field. We can always break up the individual address fields into separate inputs but wanted to see if the method I mentioned in my previous post allows for associative arrays for the data.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Change Country Value within Address Input (IE use US instead of United States)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states#post-62407</link>
			<pubDate>Wed, 13 Jun 2012 10:57:38 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">62407@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Looks like this user post a solution that may potentially work for you:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/use-2-letter-country-codes-in-value-attribute-of-dropdown#post-8984&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/use-2-letter-country-codes-in-value-attribute-of-dropdown#post-8984&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Aaron Ware on "Change Country Value within Address Input (IE use US instead of United States)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-country-value-within-address-input-ie-use-us-instead-of-united-states#post-62132</link>
			<pubDate>Mon, 11 Jun 2012 12:39:14 +0000</pubDate>
			<dc:creator>Aaron Ware</dc:creator>
			<guid isPermaLink="false">62132@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I figured before I break up every address field into separate inputs I wanted to see if there was a filter I could use to change the name (United States) AND value (US) of the country dropdown within the address input, I see I can utilize &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_countries&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_countries&#60;/a&#62; but that appears to change both the label and the value. Is there any hidden gem for &#60;code&#62;array(&#38;#39;US&#38;#39; =&#38;gt; &#38;#39;United States&#38;#39;, &#38;#39;CA&#38;#39; =&#38;gt; &#38;#39;Canada&#38;#39;)&#60;/code&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
