Skip to main content
Jan 3, 2015 12:46 AM UTC

Dynamic State and Province for US and Canada in forms

Note: Marketo Technical Support is not set up to assist with troubleshooting custom JavaScript. If you need to modify JavaScript, please ensure that you have access to an experienced JavaScript developer.


Is this article helpful ?

YesNo


 

These instructions show you how to dynamically show the State field and make it required when a user selects United States or Canada as the country in a form.

 

Note: This solution will not work with progressive profiling enabled. We will work to improve it in the future

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

Jun 30, 2015 9:56 PM UTC

The zip file redirects to community homepage, can't get it to download

Translate
Level 4
Jul 9, 2015 1:45 PM UTC

yup same here

Translate
Jul 10, 2015 8:54 PM UTC

Marketo sent me the files but I can't upload them here. Just write support.

Translate
Colin_Ryder
Level 4
Jul 14, 2015 1:15 PM UTC

Isn't this only valid with Forms 1.0?

We prefer using the visibility rules on the forms in Forms 2.0.

Translate
Mar 15, 2016 10:15 AM UTC

The download link is still not working, is there any other way we can get the .zip file?

Translate
Mike_Reynolds2
Level 10
Dec 16, 2016 9:57 PM UTC

Got the file replaced. Sorry for the trouble, didn't see the comments that it wasn't working.

Translate
Jan 16, 2017 8:10 PM UTC

I applied the HTML code so that the State/Province drop-down only appears when you select United States or Canada, but it is still showing regardless. I copied the HTML code included above on the landing page (which also has the form on it)  in an HTML element.

Can you provide insight on why the State/Province selection still shows regardless of which country one selects in the form? Thanks!!

Translate