# Wix form to email

> Add a FormDoc form to a Wix site with the Embed HTML element. Use target top so the thank-you page opens in the full window.

Wix shows custom HTML inside a frame on your page, so the form needs one extra attribute: `target="_top"`, which opens the thank-you page in the full window instead of inside the frame.

**Plan:** what you can embed depends on your Wix plan. Check Wix’s current plan details if the option is missing.

1.  In the editor, click **Add**, then **Embed Code**, then **Embed HTML**.
2.  Choose **Code**, paste the form below and replace `YOUR_ACCESS_KEY` with your key from [app.formdoc.dev/new](https://app.formdoc.dev/new):

HTML

```html
<form action="https://api.formdoc.dev/v1/submit" method="POST" target="_top">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
  <label for="fd-name">Name</label>
  <input type="text" id="fd-name" name="name" required>
  <label for="fd-email">Email</label>
  <input type="email" id="fd-email" name="email" required>
  <label for="fd-message">Message</label>
  <textarea id="fd-message" name="message" required></textarea>
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>
```

3.  Resize the frame so the whole form shows, publish and send yourself a test.

Because the form sits in its own frame, style it with a `<style>` tag in the same code.
