I have a case where the lightbox modal isn't centering when shown-- apparently this is happening only on Firefox.
What's happening is that when "positionContent" (in forms2.js) is being called, vars w and h of the contentElem are both <0 (-20).
Is this a known bug? What's the best workaround?
Thank you...
Seem to remember I had a fix, but can't find it in the Community. Can you link to your page so I can redo it?
Hi Sanford,
Thanks so much for volunteering to help on this. The page can be found here: http://45.55.170.194 (it's under development)
Click on either Request a Demo or Contact Us.
Thanks!
Couldn't find my old fix... so frustrating. Looks like you want this:
<script>
MktoForms2.onFormRender(function(form){
MktoForms2.$(window).resize();
});
</script>
Hi Sanford
is there a way to add a style valign top so that the lightbox appears on top of the page? We have embedded a Mkt LP which contains a lightbox, and I was using your script code you shared in above post. But when opening the page the form is far to low as it seems to center vertically and is not visible at first sight. The page is: http://www.trapezegroup.eu/l-n/pt
Is there a way to fix this?
Thanks!
When you use an IFRAME inside your LP like this it's not possible for the form to ever leave the confines of the frame. (You're also loading the form twice, I see -- they're stacked on top of each other in the modal -- which should be fixed.)
You can override the modal content position with
.mktoModalContent { top: 0 !important; }
But I don't think this is the right direction to go in, and no matter what you do it'll have to be below the hero image (since that's not in the frame).
Hi Sanford
Thanks, I've fixed the double form loading. Thanks for catching.
In regards to the form, I'm not looking for getting it to open outside the iframe or over the hero image, just on top of the lightbox within the iframed Mkt LP. I used your code line and it worked.
Thanks so much!
Cool, please mark as Correct in case somebody needs this in the future.