SOLVED

onFormRender doesn't fire after social sign on is rendered

Go to solution
Anonymous
Not applicable

onFormRender doesn't fire after social sign on is rendered

I'm currently using the forms2.0 javascript api to render forms on my client's website. They want to add the social signon feature to their forms, but the default styling is prohibitively ugly, and we want to change where the buttons are located in the form as well. I'm currently using the onFormRender callback to allow adding CSS classes so we can spruce up the forms and rearrange stuff client side if need be, however the onFormRender fires much earlier than the html for the social share buttons are actually rendered, leaving me out to dry. Is there some specific call back for the social share icons? Or some way I can at least change where the buttons are rendered in the form so I can just worry about styling the thing?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: onFormRender doesn't fire after social sign on is rendered

Get back to you later -- I'm back-to-back all day -- but you can see them all fire in the console.

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: onFormRender doesn't fire after social sign on is rendered

The CF widget has its own event model, though I've found it quite easy to style without adding classes. If you need to rearrange its inner DOM of course you'd need to hook an event.

Anonymous
Not applicable

Re: onFormRender doesn't fire after social sign on is rendered

Thanks, do you know where I can find documentation on those events?

SanfordWhiteman
Level 10 - Community Moderator

Re: onFormRender doesn't fire after social sign on is rendered

Get back to you later -- I'm back-to-back all day -- but you can see them all fire in the console.

Anonymous
Not applicable

Re: onFormRender doesn't fire after social sign on is rendered

With your hint at the console and this (http://developers.marketo.com/documentation/websites/social-js/), I think I've got it. It looks like there's a hook called "widget_drawn" in the global cf_scripts object which I can hook into. However since the CF library is being included by the forms2.0 api, I still have to place a watch on that cf_scripts variable as it is not available when the form itself is ready.

Thanks for your help!