<?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: For those wanting to bulk add UK Counties - here is the code</title>
		<link>https://legacy.forums.gravityhelp.com/topic/for-those-wanting-to-bulk-add-uk-counties-here-is-the-code</link>
		<description>Gravity Support Forums Topic: For those wanting to bulk add UK Counties - here is the code</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 09:47:24 +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/for-those-wanting-to-bulk-add-uk-counties-here-is-the-code" rel="self" type="application/rss+xml" />

		<item>
			<title>sokratesagogo on "For those wanting to bulk add UK Counties - here is the code"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/for-those-wanting-to-bulk-add-uk-counties-here-is-the-code#post-11884</link>
			<pubDate>Mon, 01 Nov 2010 11:54:44 +0000</pubDate>
			<dc:creator>sokratesagogo</dc:creator>
			<guid isPermaLink="false">11884@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Many thanks Bawta - killed two birds with one stone for me as a newb -  I was looking for info on how to add predefined lists - and a list of counties. Ty
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Joe on "For those wanting to bulk add UK Counties - here is the code"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/for-those-wanting-to-bulk-add-uk-counties-here-is-the-code#post-10078</link>
			<pubDate>Sun, 19 Sep 2010 18:06:51 +0000</pubDate>
			<dc:creator>Joe</dc:creator>
			<guid isPermaLink="false">10078@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm having to add a section to my site where the user chooses a UK mainland country, then the counties for that Country show up.&#60;/p&#62;
&#60;p&#62;I thought I may as well put the code here for you all to have, saving you from also having to do it.&#60;/p&#62;
&#60;p&#62;I've also included the form that I tested this on, so you can just add that if you prefer.  please note that the form also includes 1 set of towns (when England&#38;gt;&#38;gt;Somerset has been selected).&#60;/p&#62;
&#60;p&#62;Here is the form for you to import:&#60;br /&#62;
&#60;a href=&#34;http://www.film-agency.com/downloads/location_example.xml&#34; rel=&#34;nofollow&#34;&#62;http://www.film-agency.com/downloads/location_example.xml&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Here is the code, which needs to be added to your functions.php file:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_predefined_choices&#38;quot;, &#38;quot;add_predefined_choice&#38;quot;);
function add_predefined_choice($choices){
   $choices[&#38;quot;British Mainland Countries&#38;quot;] = array(&#38;quot;England&#38;quot;, &#38;quot;Scotland&#38;quot;, &#38;quot;Wales&#38;quot;);
   $choices[&#38;quot;English Counties&#38;quot;] = array(&#38;quot;Bedfordshire&#38;quot;, &#38;quot;Berkshire&#38;quot;, &#38;quot;Buckinghamshire&#38;quot;, &#38;quot;Cambridgeshire&#38;quot;, &#38;quot;Cheshire&#38;quot;, &#38;quot;Cornwall&#38;quot;, &#38;quot;Cumberland&#38;quot;, &#38;quot;Derbyshire&#38;quot;, &#38;quot;Devon&#38;quot;, &#38;quot;Dorset&#38;quot;, &#38;quot;Durham&#38;quot;, &#38;quot;Essex&#38;quot;, &#38;quot;Gloucestershire&#38;quot;, &#38;quot;Hampshire&#38;quot;, &#38;quot;Herefordshire&#38;quot;, &#38;quot;Hertfordshire&#38;quot;, &#38;quot;Huntingdonshire&#38;quot;, &#38;quot;Kent&#38;quot;, &#38;quot;Lancashire&#38;quot;, &#38;quot;Leicestershire&#38;quot;, &#38;quot;Lincolnshire&#38;quot;, &#38;quot;Middlesex&#38;quot;, &#38;quot;Norfolk&#38;quot;, &#38;quot;Northamptonshire&#38;quot;, &#38;quot;Northumberland&#38;quot;, &#38;quot;Nottinghamshire&#38;quot;, &#38;quot;Oxfordshire&#38;quot;, &#38;quot;Rutland&#38;quot;, &#38;quot;Shropshire&#38;quot;, &#38;quot;Somerset&#38;quot;, &#38;quot;Staffordshire&#38;quot;, &#38;quot;Suffolk&#38;quot;, &#38;quot;Surrey&#38;quot;, &#38;quot;Sussex&#38;quot;, &#38;quot;Warwickshire&#38;quot;, &#38;quot;Westmorland&#38;quot;, &#38;quot;Wiltshire&#38;quot;, &#38;quot;Worcestershire&#38;quot;, &#38;quot;Yorkshire&#38;quot;);
   $choices[&#38;quot;Scottish Counties&#38;quot;] = array(&#38;quot;Aberdeenshire&#38;quot;, &#38;quot;Angus&#38;quot;, &#38;quot;Argyllshire&#38;quot;, &#38;quot;Ayrshire&#38;quot;, &#38;quot;Banffshire&#38;quot;, &#38;quot;Berwickshire&#38;quot;, &#38;quot;Buteshire&#38;quot;, &#38;quot;Cromartyshire&#38;quot;, &#38;quot;Caithness&#38;quot;, &#38;quot;Clackmannanshire&#38;quot;, &#38;quot;Dumfriesshire&#38;quot;, &#38;quot;Dunbartonshire&#38;quot;, &#38;quot;East Lothian&#38;quot;, &#38;quot;Fife&#38;quot;, &#38;quot;Inverness-shire&#38;quot;, &#38;quot;Kincardineshire&#38;quot;, &#38;quot;Kinross-shire&#38;quot;, &#38;quot;Kirkcudbrightshire&#38;quot;, &#38;quot;Lanarkshire&#38;quot;, &#38;quot;Midlothian&#38;quot;, &#38;quot;Morayshire&#38;quot;, &#38;quot;Nairnshire&#38;quot;, &#38;quot;Orkney&#38;quot;, &#38;quot;Peeblesshire&#38;quot;, &#38;quot;Perthshire&#38;quot;, &#38;quot;Renfrewshire&#38;quot;, &#38;quot;Ross-shire&#38;quot;, &#38;quot;Roxburghshire&#38;quot;, &#38;quot;Selkirkshire&#38;quot;, &#38;quot;Shetland&#38;quot;, &#38;quot;Stirlingshire&#38;quot;, &#38;quot;Sutherland&#38;quot;, &#38;quot;West Lothian&#38;quot;, &#38;quot;Wigtownshire&#38;quot;);
   $choices[&#38;quot;Welsh Counties&#38;quot;] = array(&#38;quot;Anglesey&#38;quot;, &#38;quot;Brecknockshire&#38;quot;, &#38;quot;Caernarfonshire&#38;quot;, &#38;quot;Carmarthenshire&#38;quot;, &#38;quot;Cardiganshire&#38;quot;, &#38;quot;Denbighshire&#38;quot;, &#38;quot;Flintshire&#38;quot;, &#38;quot;Glamorgan&#38;quot;, &#38;quot;Merioneth&#38;quot;, &#38;quot;Monmouthshire&#38;quot;, &#38;quot;Montgomeryshire&#38;quot;, &#38;quot;Pembrokeshire&#38;quot;, &#38;quot;Radnorshire&#38;quot;);
   return $choices;
 }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/1170031.txt&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1170031.txt&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;When I've completed all the main towns for each County, I'll share the code :o)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
