CMS Development

Sebastinho
Participante

Form Height calculation of iFrames does not work properly.

Hello community,

we have a problem with our forms, these are embedded via an iFrame on our Wordpress website. When initially loading the website, the buttons at the end of the forms are sometimes cut off or are not visible at all so that the height of the forms is not calculated correctly.

 

If the page is refreshed or a form is started to be filled in, the height is recalculated exactly and the button is visible.

 

As an example, I have created a test page with various forms with different fonts. https://www.eggheads.net/form-test/

The screenshots below show how the forms behave on my screen in Firefox. Mobile via Apple and Safari, for example, you can't see any buttons at all. Depending on the device and browser, the problem behaves differently (not showing, cut off).

 

What can I do to ensure that the height calculation works exactly everywhere?

 

Best regards
Sebastinho

 

 

My Screenshots:

Download-Form_Font_Sora_Height_666.png

Download-Form_Font_Titilium Web_Height_666.png

Kontakt-Form_Font_Sora_Height_804.png

Kontakt-Form_Font_Titilium Web_Height_804.png

Demo-Form_Font_Sora_Height_796.png

Demo-Form_Font_Titilium Web_Height_796.png

      

0 Avaliação positiva
3 Respostas 3
Sebastinho
Participante

Form Height calculation of iFrames does not work properly.

@Jaycee_Lewis  i have probably found the problem.

 

When the forms are loaded, the height is calculated using a different font, presumably the HubSpot fallback font. Then, in our case, the Sora font is loaded and since the spacing is larger there than with other fonts, the buttons are cut off.

 

If the page is refreshed or the form is clicked, the height is recalculated with the defined form font, in this case Sora, and then calculated correctly.

 

If all forms are displayed in Titilium Web, Arial or Times New Roman, the form display also works correctly on initial loading. Since the height difference to these fonts is not so great.

 

Can anyone confirm this?

0 Avaliação positiva
Sebastinho
Participante

Form Height calculation of iFrames does not work properly.

Hi @joyce,

thanks for your comment.

 

Do I have any chance at all of setting something else? I can't change the iFrame and I can't tell the browser to load it differently, can I? Otherwise it would have to be set for each browser if they all calculate it differently.

 

If a form is initially loaded with a height of 990px and is loaded correctly with 1014px after clicking on the input field. Is it then due to the browser saying I am only loading the form with 990px? Shouldn't the iFrame give the browser the correct height?

 

Best regards
Sebastinho

0 Avaliação positiva
Jaycee_Lewis
Gerente da Comunidade
Gerente da Comunidade

Form Height calculation of iFrames does not work properly.

Hey, @Sebastinho 👋 Thanks for your question. 

 

I think I understand the root issue. The form resizing issue on initial load compared to reload likely occurs due to timing differences. The challenge is related to how different browsers and devices calculate and render iFrames.

 

I'd like to invite some of our community members to the conversation — hey @JonPayne @miljkovicmisa @alyssamwilie, do you have any thoughts on the challenge @Sebastinho is facing?

 

Best,

Jaycee


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Avaliação positiva