Another day, another little ExpressionEngine Plug-in. I needed to return a list of UK counties in a standalone entry form. I could have simply flicked on PHP for the template and spewed forth a foreach from an array but I thought I’d wrap it all up in a plug-in instead, so here it is.
The ‘UK Counties Select’ plug-in simply renders a drop down select form element with an alphabetical list of UK counties. Usage of the plug-in is as follows:
{exp:np_uk_counties_select name="counties"}
I could add options to specify a class, id etc but for now this does the job just fine for me.
Download: pi.np_uk_counties_select.php.zip
Obviously let me know in the comments if you have any thoughts on how this can be improved. Enjoy!
Comments are disabled here while I transition to ExpressionEngine from Textpattern. If you want to leave a comment please head over to the equivalent page here.
The 10 most recent articles.
A selection of noteworthy sites, articles or neat 'stuff'.
This week I am mostly reading...
Subscribe to: