Skip to main content
July 30, 2014
Question

Can I use something like Chosen with embed Marketo forms?

  • July 30, 2014
  • 2 replies
  • 1047 views
Hi there,

We were using forms v.1 and a jquery plugin called Chosen to style our dropdown fields (http://harvesthq.github.io/chosen/). Now that we've moved to the embedded v.2 forms on our site these styled select fields have lost the formatting.

I'm assuming it's because the new forms are embedded via javascript and Chosen also uses javascript, looks for select fields and replaces them with more standard HTML elements so it's easier to style. There's a conflict or parse order somewhere, but I'm not sure where to start. 

Do the Marketo forms ignore all other JS on my site? And if so, is there a way around that so that we can continue to use Chosen for styling our dropdowns?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

July 30, 2014
You could add a delay to the Chosen JS to implement it after the form is loaded. I did that on this page; I have a 400ms delay to apply Bootstrap styles to my forms.

http://go.servicetrade.com/Practical-Guide-to-Buying-Software-for-Service-Contractors.html

You're welcome to pillage the code :)
Level 10
July 31, 2014
In addition to Jason's response,

You can call your Chosen JS only when Form elements are loaded.