# Embedding a Form

Embed your form directly into any website or web app using an `<iframe>`.

***

## Getting the embed code

1. Open your form from the dashboard
2. Click **Share** → **Embed**
3. Copy the provided `<iframe>` snippet

The embed code looks like this:

```html
<iframe
  src="https://forms.wtf/embed/your-slug"
  width="100%"
  height="600"
  frameborder="0"
  style="border: none; border-radius: 12px;"
  allow="clipboard-write"
></iframe>
```

***

## Embed URL vs form URL

| URL                         | Purpose                                      |
| --------------------------- | -------------------------------------------- |
| `forms.wtf/f/your-slug`     | Full-page form (with header, branding)       |
| `forms.wtf/embed/your-slug` | Minimal embed version (no header, no footer) |

The embed version is designed to sit inside your existing page layout. It has a transparent background and no navigation chrome.

***

## Sizing

Set the width and height to match your layout:

```html
<!-- Full width, fixed height -->
<iframe src="..." width="100%" height="700" ...></iframe>

<!-- Centered with max width -->
<div style="max-width: 640px; margin: 0 auto;">
  <iframe src="..." width="100%" height="700" ...></iframe>
</div>
```

For forms with variable length, a height of **600–800px** works well for most forms.

***

## Wallet connection in embeds

Respondents can still connect their wallet within the embedded form. The wallet modal opens as a popup overlay on top of the iframe.

> **Note:** For wallet connection to work in embeds, ensure your site does not block popup windows or the `allow="clipboard-write"` permission.

***

## Token gating in embeds

Token gating works the same way in embedded forms. If a respondent doesn't meet the requirements, they see the gate message within the iframe.

***

## Requirements

* Your form must be **published** for the embed to work
* The embed URL is accessible to anyone (subject to your token gate rules)
* No additional configuration needed — all form settings apply to the embedded version
