Ok so I was bored and wanted to create an easy way to add states to my forms. I did see there are a few custom tags out there but they all cost money. Here is mine I wrote wrote, I tried to add all the feature the others had, I may or may not have done it the best way possible, but hey thats why I post my code sharing cause I know someone some where will point out a better way or doing something and then I learn something. That's all I want is to learn, heh. Anyway here are some examples of how to use the tag.
<cf_states>
Displays the default select both the value and display text are abbreviated
<cf_states displayText="Select something">
This adds custom starter text
<cf_states showAbbreviations="false">
This displays the full name but the value is still abbreviated
<cf_states optionAbbreviations="false">
This displays the abbreviated display text but the value is the full name
<cf_states defaultSelected="CO">
This displays a default selected
<cf_states elementName="inState">
This gives the select field a name the dafault is states
<cf_states stateFilter="AL,AK,AZ">
This removes AL,AK andAZ from the list
<cf_states stateFilter="AL,AK,AZ" revFilter="true">
This reverses the filter so only AL, AK, and AZ from the list
You can download it here or click here for a demo.
Just a quick note if you use this let me know so I can create a list of users using it. The code is open source the only thing I ask is you do not remove my info from the tag. I know there are some free ones out there but are encrypted mine is not. Use at your own risk I guarantee nothing but if you find a bug or an issue please send to me and I'll look into it. All my projects are free to all in the Open Source ColdFusion Community.