Finally: A Marketo App for Country and State Picklists in Forms

Finally: A Marketo App for Country and State Picklists in Forms


Let’s face it, creating Marketo forms with country and state pick lists is a pain—no matter how you do it.   And we all know how dependent we are on getting these forms right for lead assignment routing and segmenting data for targeted campaigns. Digital Pi has declared an end to the pain of country/state drop-down headaches by developing an application service that makes country/state forms in Marketo super simple – and best of all it’s free for any Marketo user.

The process of cutting and pasting country and state values is prone to error and tedious every single time. This has been high on my personal list of Marketo developer pain points for a long time.  So, necessity being the mother of invention and all, the Digital Pi team set out to make enabling country and state picklists in Marketo forms as easy as pie.

First, let’s look at how I have been doing this until now so we can appreciate how painful it is.

Before our application, I used to carry around three files I used each time I had to build a Marketo form that required country and state values.

  • A JavaScript file that has directions to drop-down the “State” field when the country United States is selected
  • A text file that contains a listing of all the countries of the world (as they are the day I saved that file)
  • A text file that contains all the US states and Canadian provinces

Tucked away in my “must haves” folder, I’d cut and paste all the countries and US States for the picklist values. I can’t tell you how many people asked for these files, and it was a royal pain to keep sending them to anyone else that might be building a new form and want to use them. In some cases, the webmaster included them as part of a JavaScript file on the website. That’s a whole lot of work each and every time.

Enter Digital Pi to make your life easier.  Get our handy little app from our website and from now on, you’ll never have to worry about country/state picklists again. All you need to do is put the standard Marketo form fields for Country and State on your form and then drag a small piece of script (similar to munchkin) onto your landing page template or just on the landing page when you need it.

Digital Pi script for Marketo


Digital Pi script
Voila! The values automatically get populated and it’s consistent for anyone else building out a form. No more cutting and pasting or having to upload a script that makes the state values drop down appear when you select United States. We did the heavy lifting. The values represent the most common requests I’ve received over the past 5 years which include:

  • State drop downs when these countries are selected: United States, Canada, China
  • State values for United States are displayed with their full name but values will come in with the two letter abbreviation.
  • Canadian provinces are displayed with the full name but values are abbreviated.
  • Selecting China will display the provinces using traditional (non-simplified) Chinese characters

This service is hosted with Amazon so as long as that’s up, the script will work.

Did some of your favorite countries disappear?

  • Antartica – Too cold to market there
  • Cuba, North Korea, Iran, Sudan, Syria, Burma, Libya  (embargoed countries)
  • Westerna Sahara – Disputed territory

Get the Digital Pi Country and State Picklist app now at: or check out what it looks like on a landing page at

This is just the beginning! We’ll be updating our app with many more choices and variations so you can choose the best options for your landing page.

Ryan focuses on helping companies get rapid and meaningful insights into their marketing automation investments. He is a Marketo Champion, Certified Marketo Expert and co-leader of the Dallas Marketo User Group (DMUG). Ryan is passionate about the future of marketing technology but also believes that any approach should be guided by the core principles of “simple” and “practical”.