Skip to main content
Answered

Typeform embed in mobile issue

  • 30 May 2024
  • 4 replies
  • 44 views

Hi! I’m embedding Typeform into HTML document like stated in example:

https://www.typeform.com/developers/embed/inline/#fullscreen-embed

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Static HTML Demo</title>
<style>
* {
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
}
#form {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="form" data-tf-widget="fi7sbBXW"></div>
<script src="https://embed.typeform.com/next/embed.js"></script>
</body>
</html>

And loading this HTML document in WKWebView. Unfortunately it’s displayed as a desktop site:
 

But the URL that is constructed by embed js library is displayed correctly (with large font and buttons):
 

https://wheely.typeform.com/to/fi7sbBXW?typeform-embed-id=09490275942586612&typeform-embed=embed-widget&typeform-source=&typeform-medium=embed-sdk&typeform-medium-version=next&force-touch=true&add-placeholder-ws=true&typeform-embed-handles-redirect=1
 


what can i do with that? Thanks in advance!


P.S. When loading html file on desktop Safari browser i’m recieving the following errors in console:

 

 

4 replies

Userlevel 7
Badge +5

@mathio might be able to help with this!

Userlevel 7
Badge +5

Hello @nikita_s 

you can try using this viewport meta tag in your HTML page <head>:

<meta name="viewport" content="width=device-width, initial-scale=1" />

 

@mathio it worked! Thank you!

Userlevel 7
Badge +5

Woot! Glad to hear it, @nikita_s ! Thanks so much, @mathio 

Reply