嵌入 Fillio 表单

三种嵌入表单的方式:标准、弹窗和全页

嵌入模式

Fillio 提供三种嵌入模式:

  • 标准 - 内联 iframe 嵌入
  • 弹窗 - 模态弹出层
  • 全页 - 独立页面

标准嵌入

将表单作为内联 iframe 嵌入。支持动态高度和自定义选项。

嵌入代码

<iframe data-fillio-src="https://fillio.so/embed/YOUR_FORM_ID" width="100%" height="800" frameborder="0" marginheight="0" marginwidth="0" title="Form" loading="lazy"></iframe>
<script>var d=document,w="https://fillio.so/widgets/embed.js",v=function(){"undefined"!=typeof Fillio?Fillio.loadEmbeds():d.querySelectorAll("iframe[data-fillio-src]:not([src])").forEach((function(e){e.src=e.dataset.fillioSrc}))};if("undefined"!=typeof Fillio)v();else if(d.querySelector('script[src="'+w+'"]')==null){var s=d.createElement("script");s.src=w,s.onload=v,s.onerror=v,d.body.appendChild(s);}</script>

选项

在 URL 中添加以下参数:

参数描述
?hideTitle=1隐藏表单标题
?transparentBackground=1透明背景
?dynamicHeight=1启用动态高度

弹窗嵌入

以模态弹出层的方式打开表单。

1. 添加脚本

<script async src="https://fillio.so/widgets/embed.js"></script>

2. 按钮方式

<button data-fillio-open="YOUR_FORM_ID" data-fillio-width="500">Open Form</button>

3. JavaScript 方式

Fillio.openPopup('YOUR_FORM_ID', {
  width: 500,
  hideTitle: false
});

数据属性

属性描述
data-fillio-open表单 ID(必填)
data-fillio-width宽度(像素)
data-fillio-hide-title设置为 "1" 以隐藏标题

全页嵌入

创建一个包含您表单的独立 HTML 页面。

<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>Form</title>
    <script async src="https://fillio.so/widgets/embed.js"></script>
    <style type="text/css">
      html { margin: 0; height: 100%; overflow: hidden; }
      iframe { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border: 0; }
    </style>
  </head>
  <body>
    <iframe data-fillio-src="https://fillio.so/embed/YOUR_FORM_ID" width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0" title="Form"></iframe>
  </body>
</html>

选项

在 URL 中添加以下参数:

参数描述
?transparentBackground=1透明背景