<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Drop down must show labels but enter different data in the database</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Drop down must show labels but enter different data in the database</description>
<language>en</language>
<pubDate>Sun, 14 Jun 2026 04:57:38 +0000</pubDate>

<item>
<title>yuniar on "Drop down must show labels but enter different data in the database"</title>
<link>https://www.machform.com/forums/topic/drop-down-must-show-labels-but-enter-different-data-in-the-database#post-15761</link>
<pubDate>Tue, 28 Aug 2012 19:01:51 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">15761@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Ok, you can keep the &#34;Restrict to US State Selection&#34; enabled. Then modify your &#34;includes/view-functions.php&#34; file around line 3305:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//if this address field is restricted to US only
if(empty($element-&#38;gt;is_design_mode) &#38;#38;&#38;#38; !empty($element-&#38;gt;address_us_only)){
	$country_markup = &#38;#39;&#38;lt;option selected=&#38;quot;selected&#38;quot; value=&#38;quot;United States&#38;quot;&#38;gt;United States&#38;lt;/option&#38;gt;&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;you can remove that block of code. This would display the complete country list and yet still display the US states as well.
&#60;/p&#62;</description>
</item>
<item>
<title>JerryH on "Drop down must show labels but enter different data in the database"</title>
<link>https://www.machform.com/forums/topic/drop-down-must-show-labels-but-enter-different-data-in-the-database#post-15740</link>
<pubDate>Tue, 28 Aug 2012 05:32:38 +0000</pubDate>
<dc:creator>JerryH</dc:creator>
<guid isPermaLink="false">15740@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;OK, that helps but I am still not there 100%.&#60;/p&#62;
&#60;p&#62;I sucessfully switched my form to use the Address field and customized the State labels and values the way I need them BUT....&#60;br /&#62;
I NEED the State drop down AND I NEED the Country drop down.&#60;/p&#62;
&#60;p&#62;Right now, I have to select &#34;Restrict to US&#34; to get the State drop down which eliminates all countries but US.&#60;/p&#62;
&#60;p&#62;Is there a way around this?&#60;br /&#62;
Thanks.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Drop down must show labels but enter different data in the database"</title>
<link>https://www.machform.com/forums/topic/drop-down-must-show-labels-but-enter-different-data-in-the-database#post-15720</link>
<pubDate>Sun, 26 Aug 2012 18:58:13 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">15720@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Using the general dropdown field, I'm afraid it won't be possible to do so.&#60;br /&#62;
However, if you are using the Address field (which contain the State field), it is possible to modify the State dropdown to do what you need.&#60;/p&#62;
&#60;p&#62;You can modify &#34;includes/view-functions.php&#34; file. Search around line 3151 and you'll find these lines:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$state_list[0][&#38;#39;value&#38;#39;] = &#38;#39;Alabama&#38;#39;;
$state_list[1][&#38;#39;value&#38;#39;] = &#38;#39;Alaska&#38;#39;;
$state_list[2][&#38;#39;value&#38;#39;] = &#38;#39;Arizona&#38;#39;;
$state_list[3][&#38;#39;value&#38;#39;] = &#38;#39;Arkansas&#38;#39;;
$state_list[4][&#38;#39;value&#38;#39;] = &#38;#39;California&#38;#39;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Simply modify the above with the state codes.
&#60;/p&#62;</description>
</item>
<item>
<title>JerryH on "Drop down must show labels but enter different data in the database"</title>
<link>https://www.machform.com/forums/topic/drop-down-must-show-labels-but-enter-different-data-in-the-database#post-15701</link>
<pubDate>Sat, 25 Aug 2012 00:23:02 +0000</pubDate>
<dc:creator>JerryH</dc:creator>
<guid isPermaLink="false">15701@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I need to find a way to have the list in a drop down show labels (Arizona, California, etc.) but enter different data in the database (AZ, CA, etc.).&#60;/p&#62;
&#60;p&#62;The users need an easy to pick description but the database requires a 2 digit code.&#60;/p&#62;
&#60;p&#62;Can this be done?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
