SOLVED

Callback function for Form on Marketo Landing Page

Go to solution
Anonymous
Not applicable
I have a technical question:

We are trying to apply some additional functionality and styles to a form on a marketo landing page. The only way for us to go about doing this at the moment is to use javasript.

The problem with using javascript is that we have to wait until the form is loaded (marketo's javascript) before we can start executing ours.

Does anybody know if a callback function on a form is possible? Right now we are using a setTimeout, which is not ideal.

Thanks,
Erik
Tags (1)
1 ACCEPTED SOLUTION
Anonymous
Not applicable
Yes there is. You can find tons of info here: http://developers.marketo.com/documentation/websites/forms-2-0/

Look specifically for the method ".whenReady(callback)"

You can see the code in use on this page: 
http://go.servicetrade.com/VerizonEventAugust2014.html. I use the callback to apply Bootstrap styles.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable
No problem guys... love to help with JS stuff as it's what I'm trying my best to master 🙂
Anonymous
Not applicable
Thanks Jason! Your solution did the trick!
Anonymous
Not applicable
@Jason, I like your example!
Anonymous
Not applicable
This should be possible with the whenReady or onFormRender methods. There is more info about these methods on the dev docs:

http://developers.marketo.com/documentation/websites/forms-2-0/

Anonymous
Not applicable
Yes there is. You can find tons of info here: http://developers.marketo.com/documentation/websites/forms-2-0/

Look specifically for the method ".whenReady(callback)"

You can see the code in use on this page: 
http://go.servicetrade.com/VerizonEventAugust2014.html. I use the callback to apply Bootstrap styles.