Skip to content

Instantly share code, notes, and snippets.

@BinaryKitten
Created August 5, 2014 09:08
Show Gist options
  • Select an option

  • Save BinaryKitten/268edfe26466dd8bed39 to your computer and use it in GitHub Desktop.

Select an option

Save BinaryKitten/268edfe26466dd8bed39 to your computer and use it in GitHub Desktop.
add_filter("gform_address_types", "uk_address", 10, 2);
function uk_address($address_types, $form_id)
{
$address_types["uk"] = array(
"label" => "UK",
"country" => "United Kingdom",
"zip_label" => "Postcode",
"state_label" => "County",
"states" => array(
'Bedfordshire' => 'Bedfordshire',
'Berkshire' => 'Berkshire',
'Buckinghamshire' => 'Buckinghamshire',
'City of Bristol' => 'City of Bristol',
'Cambridgeshire' => 'Cambridgeshire',
'Cheshire' => 'Cheshire',
'Cornwall' => 'Cornwall',
'Cumbria' => 'Cumbria',
'Derbyshire' => 'Derbyshire',
'Devon' => 'Devon',
'Dorset' => 'Dorset',
'Durham' => 'Durham',
'East Sussex' => 'East Sussex',
'Essex' => 'Essex',
'Gloucestershire' => 'Gloucestershire',
'Greater London' => 'Greater London',
'Greater Manchester' => 'Greater Manchester',
'Hampshire' => 'Hampshire',
'Hertfordshire' => 'Hertfordshire',
'Isle of Wight' => 'Isle of Wight',
'Kent' => 'Kent',
'Lancashire' => 'Lancashire',
'Leicestershire' => 'Leicestershire',
'Lincolnshire' => 'Lincolnshire',
'City of London' => 'City of London',
'Merseyside' => 'Merseyside',
'Norfolk' => 'Norfolk',
'Northamptonshire' => 'Northamptonshire',
'Northumberland' => 'Northumberland',
'North Yorkshire' => 'North Yorkshire',
'Nottinghamshire' => 'Nottinghamshire',
'Oxfordshire' => 'Oxfordshire',
'Rutland' => 'Rutland',
'Shropshire (Salop)' => 'Shropshire (Salop)',
'Somerset' => 'Somerset',
'South Yorkshire' => 'South Yorkshire',
'Staffordshire' => 'Staffordshire',
'Suffolk' => 'Suffolk',
'Surrey' => 'Surrey',
'Tyne and Wear' => 'Tyne and Wear',
'Warwickshire' => 'Warwickshire',
'West Midlands' => 'West Midlands',
'West Sussex' => 'West Sussex',
'West Yorkshire' => 'West Yorkshire',
'Wiltshire' => 'Wiltshire',
'Worcestershire' => 'Worcestershire',
)
);
return $address_types;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment