SOLVED

Callback function for Form on Marketo Landing Page

Go to solution
Anonymous
Not applicable

Callback function for Form on Marketo Landing Page

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

Accepted Solutions
Anonymous
Not applicable

Re: Callback function for Form on Marketo Landing Page

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

Re: Callback function for Form on Marketo Landing Page

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.
Anonymous
Not applicable

Re: Callback function for Form on Marketo Landing Page

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

Re: Callback function for Form on Marketo Landing Page

@Jason, I like your example!
Anonymous
Not applicable

Re: Callback function for Form on Marketo Landing Page

Thanks Jason! Your solution did the trick!
Anonymous
Not applicable

Re: Callback function for Form on Marketo Landing Page

No problem guys... love to help with JS stuff as it's what I'm trying my best to master 🙂