Skip to content

Instantly share code, notes, and snippets.

@loneaggie
Created August 2, 2012 13:32
Show Gist options
  • Save loneaggie/3237136 to your computer and use it in GitHub Desktop.
Save loneaggie/3237136 to your computer and use it in GitHub Desktop.
Contact Form 7 State Dropdown
[select* selectedState
"Alabama|AL" "Alaska|AK" "Arizona|AZ" "Arkansas|AR"
"California|CA" "Colorado|CO" "Connecticut|CT" "Delaware|DE"
"Washington DC|DC" "Florida|FL" "Georgia|GA" "Hawaii|HI"
"Idaho|ID" "Illinois|IL" "Indiana|IN" "Iowa|IA" "Kansas|KS"
"Kentucky|KY" "Louisiana|LA" "Maine|ME" "Maryland|MD"
"Massachusetts|MA" "Michigan|MI" "Minnesota|MN" "Mississippi|MS"
"Missouri|MO" "Montana|MT" "Nebraska|NE" "Nevada|NV"
"New Hampshire|NH" "New Jersey|NJ" "New Mexico|NM" "New York|NY"
"North Carolina|NC" "North Dakota|ND" "Ohio|OH" "Oklahoma|OK"
"Oregon|OR" "Pennslyvania|PA" "Rhode Island|RI"
"South Carolina|SC" "South Dakota|SD" "Tennessee|TN"
"Texas|TX" "Utah|UT" "Vermont|VT" "Virginia|VA" "Washington|WA"
"West Virginia|WV" "Wisconsin|WI" "Wyoming|WY"]
Copy link

ghost commented Jun 5, 2018

Thank you

@Hackinet
Copy link

Hackinet commented Oct 9, 2018

Thank you.

@Shizart
Copy link

Shizart commented May 2, 2019

Props.

@tanmoy-web
Copy link

Thanks

@zagarskas
Copy link

zagarskas commented Sep 16, 2022

the pipe separators seem to not work correctly anymore... went with this because the APIs we use require 2 digit codes for state

[select* your-state "AL" "AK" "AZ" "AR" "CA" "CO" "CT" "DE" "DC" "FL" "GA" "HI" "ID" "IL" "IN" "IA" "KS" "KY" "LA" "ME"  "MD" "MA" "MI" "MN" "MS" "MO" "MT" "NE" "NV" "NH" "NJ" "NM" "NY" "NC" "ND" "OH" "OK" "OR" "PA" "RI" "SC" "SD" "TN" "TX" "UT" "VT" "VA" "WA" "WV" "WI" "WY"]

@DanielBabcock
Copy link

Thanks!

@Hackinet
Copy link

Got a notification on email. I can't believe 11 years have passed.

@Gretchen5
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment