UK Counties - Select - Field Elements

More
13 years 7 months ago #10683 by Ephemera
I needed a UK County dropdown select which I had to create manually.

It took me a while to do it so I thought I'd share it here in case anyone else needs a UK County dropdown.

Here's the text I use in the Field Elements box
Code:
ENGLAND::ENGLAND%% Avon::Avon%% Bath_ NESomerset::Bath & NE Somerset%% Bedfordshire::Bedfordshire%% Berkshire::Berkshire%% Blackburn_with_Darwen::Blackburn with Darwen%% Blackpool::Blackpool%% Bournemouth::Bournemouth%% Bracknell Forest::Bracknell Forest%% Brighton_Hove::Brighton & Hove%% Buckinghamshire::Buckinghamshire%% Cambridgeshire::Cambridgeshire%% Cheshire_East::Cheshire East%% CheshireWest_Chester::Cheshire West & Chester%% City of Bristol::City of Bristol%% Kingston_Upon_Hull::City of Kingston Upon Hull%% Cleveland::Cleveland%% Cornwall::Cornwall%% County_Durham::County Durham%% Cumbria::Cumbria%% Darlington::Darlington%% Derby::Derby%% Derbyshire::Derbyshire%% Devon::Devon%% Dorset::Dorset%% Durham::Durham%% East_Sussex::East Sussex%% Essex::Essex%% Gloucestershire::Gloucestershire%% Halton::Halton%% Hampshire::Hampshire%% Hartlepool::Hartlepool%% Herefordshire::Herefordshire%% Hertfordshire::Hertfordshire%% Isle_of_Man::Isle of Man%% Isles_of_Scilly::Isles of Scilly%% Isle_of_Wight::Isle of Wight%% Kent::Kent%% Lancashire::Lancashire%% Leicester::Leicester%% Leicestershire::Leicestershire%% London::London%% Luton::Luton%% Medway::Medway%% Merseyside::Merseyside%% Middlesex::Middlesex%% Middlesborough::Middlesborough%% Milton Keynes::Milton Keynes%% Norfolk::Norfolk%% Northamptonshire::Northamptonshire%% NELincolnshire::North East Lincolnshire%% Northumberland::Northumberland%% North_Humberside::North Humberside%% North_Somerset::North Somerset%% North_Yorkshire::North Yorkshire%% Nottingham::Nottingham%% Nottinghamshire::Nottinghamshire%% Oxfordshire::Oxfordshire%% Peterborough::Peterborough%% Plymouth::Plymouth%% Poole::Poole%% Portsmouth::Portsmouth%% Reading::Reading%% Redcar_Clevelend::Redcar & Clevelend%% Rutland::Rutland%% Shropshire::Shropshire%% Slough::Slough%% Somerset::Somerset%% Southampton::Southampton%% Southend_on_Sea::Southend on Sea%% South_Humberside::South Humberside%% South_Gloucestershire::South Gloucestershire%% South Yorkshire::South Yorkshire%% Staffordshire::Staffordshire%% Stockton_on_Tees::Stockton-on-Tees%% Stoke_on_Trent::Stoke-on-Trent%% Suffolk::Suffolk%% Surrey::Surrey%% Swindon::Swindon%% Telford_Wrekin::Telford & Wrekin%% Torbay::Torbay%% Tyne_and_Wear::Tyne and Wear%% Warwickshire::Warwickshire%% Warrington::Warrington%% West_Berkshire::West Berkshire%% West_Midlands::West Midlands%% West_Sussex::West Sussex%% West_Yorkshire::West Yorkshire%% Wiltshire::Wiltshire%% Windsor_ Maidenhead::Windsor & Maidenhead%% Wokingham::Wokingham%% Worcestershire::Worcestershire%% WALES::WALES%% Bridgend::Bridgend%% Blaenau_Gwent::Blaenau Gwent%% Cardiff::Cardiff%% Caerphilly::Caerphilly%% Carmarthenshire::Carmarthenshire%% Ceredigion::Ceredigion%% Clwyd::Clwyd%% Conwy::Conwy%% Denbighshire::Denbighshire%% Dyfed::Dyfed%% Flintshire::Flintshire%% Gwent::Gwent%% Gwynedd::Gwynedd%% Isle_of_Anglesey::Isle of Anglesey%% Methyr_Tydfil::Methyr Tydfil%% Mid_Glamorgan::Mid Glamorgan%% Monmouthshire::Monmouthshire%% Neath_Port_Talbot::Neath Port Talbot%% Newport::Newport%% Pembrokeshire::Pembrokeshire%% Powys::Powys%% Rhondda_Cynon_ Taff::Rhondda, Cynon, Taff%% South Glamorgan::South Glamorgan%% Swansea::Swansea%% Torfaen::Torfaen%% Vale_of_Glamorgan::The Vale of Glamorgan%% West_Glamorgan::West Glamorgan%% Wrexham::Wrexham%% SCOTLAND::SCOTLAND%% Aberdeen_City::Aberdeen City%% Aberdeenshire::Aberdeenshire%% Angus::Angus%% Argyl_ Bute::Argyll & Bute%% Banffshire::Banffshire%% Berwickshire::Berwickshire%% Caithness::Caithness%% City_of_Edinburgh::City of Edinburgh%% Clackmannanshire::Clackmannanshire%% Dumfries_Galloway::Dumfries & Galloway%% Dunbartonshire::Dunbartonshire%% Dundee_City::Dundee City%% East_Ayrshire::East Ayrshire%% East_Dunbartonshire::East Dunbartonshire%% East_Lothian::East Lothian%% Eilean_Siar::Eilean Siar%% Falkirk::Falkirk%% Fife::Fife%% Glasgow_City::Glasgow City%% Highland::Highland%% Inverclyde::Inverclyde%% Invernessshire::Inverness-shire%% Kincardineshire::Kincardineshire%% Kinrossshire::Kinross-shire%% Kirkcudbrightshire::Kirkcudbrightshire%% Lanarkshire::Lanarkshire%% Midlothian::Midlothian%% Moray::Moray%% Nairnshire::Nairnshire%% North_Ayrshire::North Ayrshire%% North_Lanarkshire::North Lanarkshire%% Orkney_Islands::Orkney Islands%% Peeblesshire::Peeblesshire%% Perthshire::Perthshire%% Renfrewshire::Renfrewshire%% Rossshire::Ross-shire%% Roxburghshire::Roxburghshire%% Scottish_Borders::Scottish Borders%% Selkirkshire::Selkirkshire%% Shetland_Islands::Shetland Islands%% South_Lanarkshire::South Lanarkshire%% Stirlingshire::Stirlingshire%% Sutherland::Sutherland%% West_Lothian::West Lothian%% Wigtownshire::Wigtownshire%% NORTHERN_IRELAND::NORTHERN IRELAND%% Antrim::Antrim%% Ardes::Ardes%% Armagh::Armagh%% Ballymena::Ballymena%% Ballymoney::Ballymoney%% Banbridge::Banbridge%% Belfast::Belfast%% Carrickfergus::Carrickfergus%% Castlereagh::Castlereagh%% Coleraine::Coleraine%% Cookstown::Cookstown%% Craigavon::Craigavon%% Derry::Derry%% Down::Down%% Dungannon::Dungannon%% Fermanagh::Fermanagh%% Larne::Larne%% Limavady::Limavady%% Lisburn::Lisburn%% Londonderry::Londonderry%% Moyle::Moyle%% Newry_Mourne::Newry & Mourne%% Newtownabbey::Newtownabbey%% North_Down::North Down%% Omagh::Omagh%% Strabane::Strabane%% Tyrone::Tyrone%% CHANNEL_ISLES::CHANNEL ISLES%% Guernsey::Guernsey%% Jersey::Jersey

This is my first foray into Flexi Content.

I followed the instructions on www.flexicontent.org/features/fields.html but it took me a while to realise (A) that there must be a single space between each county_name::County Name%% and no line breaks; and (B) that spaces in the first part (value) could not contain spaces or special characters.

Initially I thought it would be easy enough just to use a spreadsheet, copy my list of county names into the first column, :: in the second, the county names again in the third, %% in the fourth and just concatenate into the fifth column.... and it worked fine up until that point.

I copied the concatenated column into Notepad and then into Notepad++ but that was when I came up against the carriage return (CR), line return (LR) (line break)issue.

If anyone knows how to use search and replace in a text or code editor to change \cr and \lr to a non breaking space then please post the details.

I use Notepad++ and wasn't able or savvy enough to figure out how to do that. :oops:

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #10688 by kenmcd
.
Replacing Newlines - Notepad++ Wiki
sourceforge.net/apps/mediawiki/notepad-p...e=Replacing_Newlines
I think Control+M in the search/replace box finds the right character.

Another technique is to turn-on the display of end-of-line characters, highlight that character, and then use it for the replace function.

I use this same technique in UltraEdit.
Also in UltraEdit a ^p in the Search/Replace box finds all paragraph marks.
I mention UltraEdit because I changed to it from Notepad++ a several years ago and am quite happy with it.


Note that for the FLEXIcontent Field Elements box you want to use just regular spaces not non-breaking spaces.


Thanks for the UK Counties code!

.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #10689 by Ephemera
Thanks for that - I am a newbie, and fast realising I need visual prompts such as screen shots as well as videos with sound to make sense of it all to benefit from the complexities of FlexiContent.

I was able to highlight/make visible the end of line characters in Notepad++ by turning on the display but could not select them to highlight them.

I'll try Ultra Edit. The Sourceforge forum for Notepad++ seems to suggest that there is an issue with Notepad++ handling of search and replace of those elements.

BTW how do you figure out which are regular spaces and which are non-breaking spaces in a text doc?

I understand html as it is visible, but in Notepad, Notepad++ I can't see what is beneath the text.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #10690 by kenmcd
.
Generally when using a text editor there isn't anything "beneath the text."
There are just a few characters you cannot readily see - tab, paragraph, etc.

There is no non-breaking space in text.
A web browser interprets the HTML text string   as a non-breaking space.

Extended characters are generally those which do not appear on your keyboard.
There is no non-breaking space character on your keyboard.

Word processor applications, as opposed to text editors, use extended characters to store and display a non-breaking space.
Which extended character(s) used is decided by the word processor.

These extended characters inserted by word processors are why you do not use a word processor to edit HTML or PHP code.
Weird things happen.
Example:
www.flexicontent.org/forum/index.php?f=2...art=0&rb_v=viewtopic


Re: UltraEdit - I switched to UltraEdit after having problems trying to do certain things, and not finding any documentation, or the feature simply was not there.
I use UltraEdit literally every day.
Excellent tool. Highly recommended.


.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.260 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline