AI fill for Wix forms: what works with Embed HTML

Updated 2026-10-30

Your visitors are tired of typing into boxes. Let their AI do it. On Wix I must tell you something first: the easy way does not work. Wix puts code from Embed HTML inside an iframe. A script in an iframe cannot see your Wix form. So here are two ways that can work.

Why Embed HTML does not work for this

Wix says: "The HTML and URL elements in our editor are iFrames." The script looks for the form on its own page. In an iframe, its own page is the small frame, and the frame has no form. I tested this: a form on the page, the script in an iframe next to it. No button appeared.

Way 1: show an AI Form API form

This works on every Wix site. You make a form with AI Form API and show it in an Embed a site element.

  1. In the Wix editor, click the Add Elements icon on the left.
  2. Click Embed Code, then Popular Embeds.
  3. Click Embed a site to add it to your page.
  4. Click the element on your page. Click Enter Website Address.
  5. Under "What's the website address?", enter your form's link with ?embed=1 at the end:
text
https://aiformapi.com/f/your-slug?embed=1
  1. Click Apply.
  2. Make the element tall enough for the whole form. Publish, and check it on a phone.

Make the form first. The embed guide shows how, and the quickstart has the API way. The slug is the last part of your form's link.

Way 2: Custom Code (not tested on Wix)

Custom Code puts a script on the page itself, not in an iframe. I could not test it on a live Wix site. I also do not know whether the Wix Forms app builds a normal form element. Try it, and if there is no button, use Way 1.

  1. In your site's dashboard, open Settings.
  2. Under Development & integrations, click Custom Code.
  3. Click + Add Custom Code at the top right.
  4. Paste the snippet below. Give it a name.
  5. Under Add Code to Pages, choose Choose specific pages. Select the page with your form.
  6. Under Place Code in, choose Body – end.
  7. Click Apply.
html
<script src="https://aiformapi.com/agent-fill.js"></script>

Wix says your site must be published and have a connected domain. With specific pages chosen, the script uses the one form on that page. If the page has two forms, it does nothing.

Sources (read 2026-10-30)

Questions

Why can't I paste the script into Embed HTML on Wix?

Wix says its HTML and URL elements are iframes. A script inside an iframe sees only the iframe, not the rest of your page. It cannot find your Wix form. I tested this with a script in an iframe beside a form on the page: no button appeared.

Do I need a paid Wix plan for Custom Code?

Wix's article does not name a plan. It says your site must be published and have a connected domain. Check your own dashboard.

How tall should the embedded form be on Wix?

Wix embeds have a fixed size and do not grow by themselves. Give the element enough height for your whole form, and check it on a phone. Wix suggests percentage sizes such as 100 percent instead of fixed pixels.