More DW Snippets – 50 states form select in two versions

In a previous entry I wrote about snippets in Dreamweaver. This is simply a method for saving small bits of code that you can use and reuse. There's a panel in DW where you save these, and I guess whether or not you use this particular panel, chances are you have a place to store little pieces of code like this, that you refer to on occasion. I know I do.

So, here are another couple of bits that you can file away somewhere. They can both be used in forms, possibly for registrations or gathering data in a survey. They are the form select dropdowns for all 50 states, done in two ways; one with the full name and the other with just the abbreviations. Rather than include the code on the page, I'll just show you what it looks like, and you can go in, 'view source' and take whichever one you want. Take both; when you need them you'll be happy that you have them put away in your bag of tricks.

While you're at it, save it as a snippet in DW, and you won't even have to go looking for it!

While the two versions look different onscreen, they both pass the value as a standard two character postal abbreviation.

Here is the 50 states dropdown with abbreviations:

Here is the 50 state dropdown with the states full name included.

I have several more that I'll be posting here, let me know if you find one that's useful.

Bookmark & Share:
  • Facebook
  • StumbleUpon
  • Digg
  • LinkedIn
  • FriendFeed
  • MySpace
  • email

    Share on Google Buzz

  1. Thanks! This was definitely a helpful timesaver :) -Don

    Comment by Don — May 16, 2007 @9:05 am

  2. I was just about to hand-type those in, then figured I'd look around first. Thank you very much - super handy! - John

    Comment by John — November 9, 2007 @10:29 pm

  3. Usefull but why didn't you post the html code?

    Comment by Kyle — August 7, 2009 @8:47 pm

Leave a comment

RSS feed for comments on this post. | TrackBack URL