Dashboard

Embedding in HTML

Add FavForm to any static HTML website or custom-built site.

Quick start

Add these two lines to your HTML file — the script tag goes before </body>:

HTML
<!-- Add this where you want the form to appear -->
<fav-form data-embedId="your-form-id"></fav-form>

<!-- Add this before </body> -->
<script src="https://favform.com/embed/v1.js" async></script>

Complete example

Here's a full HTML page with an embedded form:

HTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Contact Us</title>
</head>
<body>
  <h1>Contact Us</h1>
  <p>Fill out the form below and we'll get back to you.</p>
  
  <!-- FavForm embed -->
  <fav-form data-embedId="your-form-id"></fav-form>

  <!-- FavForm SDK (load once, before </body>) -->
  <script src="https://favform.com/embed/v1.js" async></script>
</body>
</html>

Embedding polls

HTML
<fav-form data-embedId="your-poll-id"></fav-form>

Embedding widgets

Widgets appear as floating buttons. Add anywhere in your HTML:

HTML
<fav-form data-embedId="your-widget-id"></fav-form>

Using iframes

If you prefer iframes or can't use JavaScript:

HTML
<iframe 
  src="https://favform.com/f/your-form-id" 
  width="100%" 
  height="600" 
  frameborder="0" 
  style="border: none;">
</iframe>
Replace /f/ with /p/ for polls or /w/ for widgets.

Attributes

data-embedId

Your unique embed ID from the Publish step (required)