@formfacade/embed-react

中文文档
1.1.2发布于 2024/11/08ISCESM + CJS零依赖近 30 天下载 2116

提高你的Google Form的外表,以无缝配合您网站使用Formfacade的品牌.

中文使用文档
文档目录7 节
  1. 说明
  2. 特征
  3. 目录
  4. 安装
  5. 使用量
  6. 示例
  7. 支助
Formfacade customzie logo

自定义UI并嵌入回放中的Google表格而无需Iframe.

License

说明

使用Formfacade将Google表格集成到您的React应用程序中,并配有用户界面来补充您的网站并摆脱Google表格品牌.

@formfacade:embed-react demo

特征

  • 适合与光明和黑暗背景无缝融合的用户界面
  • 在提交表单时容易执行召回功能
  • 嵌入脚本取而代之为iframe,以方便装入并方便UI.

目录

安装

  1. 下载窗体外观插件 : 从中获取窗体外观插件 谷歌工作空间市场。 。 。 .

  2. 访问 Google 表格 : 打开您的谷歌表单

  3. 添加窗体加载:

    • 点击谷歌表格中的“ ad-ons” 按钮 .
    • 从可用的添加列表中选择“ Formfacade ” .
    • 选择“ 在网页中嵌入” .
  4. 嵌入表单中 :

    • 点击“ Embed” 时, 将会出现一个对话框, 问“ 您要嵌入此表单吗 ? ”
    • 选择"Embed in React App"进行整合.
    • 从此选择获取“ 格式化 ” .
  5. 与 React App 整合 : 使用以下 npm 命令安装将窗体嵌入到您的 React 应用程序中所需的软件包 :

npm i @formfacade/embed-react

详情请访问 如何将Google表单嵌入到您的 React app 中而不用 Iframe ?

使用量


import FormfacadeEmbed from "@formfacade/embed-react";

<FormfacadeEmbed
    formFacadeURL={formFacadeURL}
    onSubmitForm={onSubmitForm}
/>

Prop类型默认值所需/可选
窗体结构字符串需求需求
提交表格函数() => console.log('Form Submitted');可选
预填表函数未说明可选
格式记录函数() => console.log('Form loaded');可选
冲出布尔虚假可选
  • 窗体结构: Formfacade嵌入式谷歌表格的URL. 这是一个需要的领域.
  • 提交表格: 在表单提交时触发的回调函数.
  • 预填表: 要预先填充窗体数据的函数。 选取之.
  • 格式记录: 当一个窗体被装入时可以引用的函数。 选取之.
  • 冲出: 禁用自动保存.

示例

Edit embed-react


import React from "react";
import FormfacadeEmbed from "@formfacade/embed-react";

const FORMFACADE_URL = "https://formfacade.com/include/109671923741510513923/form/1FAIpQLSetAzIt89c0hBCWhI1AzUWRXDQ0VV1JAUph6i_3dvNpT-ZpqA/classic.js?div=ff-compose";


const App = () => {

  const prefillForm = () => {
    // Optional: Refer to the provided link to find the entry IDs for prefilling input fields: 
    // https://formfacade.com/website/does-formfacade-support-pre-filled-survey-links-like-native-google-forms-on-1FAIpQLSfGvg22V7Lzyw_5AEbKBSpklS_TMw6tKxcQiDqlC9KvfBVTgQ.html
    
    return {
      'entry.1297600622': '@formfacade/embed-react',
      'entry.813617742': `${new Date()}`
    };
  };

  const onSubmitForm = () => {
    // Add your specific form submission handling code below.
    console.log("----FORM SUBMITTED----");
  };

  const onFormLoad = () => {
    console.log("----FORM LOADED----");
  };



  return (
    <div className="App">
      <FormfacadeEmbed
        formFacadeURL={FORMFACADE_URL}

        // Optional: Callback function triggered on form submission. Remove if not required.
        onSubmitForm={onSubmitForm}

        // Optional: Function that can be invoked when a form is loaded. Remove if not required.
        onFormLoad={onFormLoad}
    
        // Optional: Use prefillForm to prefill form fields. See prefillForm function for details. Remove if not required.
        prefillForm={prefillForm}

        // Optional
        flush={true}
      />
    </div>
  );
};

export default App;


支助

支持, 电子邮件 支持@ formfacade.com

版本与发布记录

@formfacade/embed-react 共发布 10 个版本,首次发布于 2024/02/02;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.1.2latest2024/11/082 年前
1.1.12024/11/082 年前
1.1.02024/11/072 年前
1.0.42024/04/162 年前
1.0.32024/04/162 年前
1.0.22024/04/162 年前

关于 @formfacade/embed-react 的常见问题

@formfacade/embed-react 是什么?

提高你的Google Form的外表,以无缝配合您网站使用Formfacade的品牌.

如何安装 @formfacade/embed-react?

在项目目录运行 npm install @formfacade/embed-react,或使用 pnpm add / yarn add / bun add。

@formfacade/embed-react 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/formfacade__embed-react 是否存在。

@formfacade/embed-react 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@formfacade/embed-react 可以商用吗?

@formfacade/embed-react 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@formfacade/embed-react 的下载量有多少?

根据 npm 官方下载统计,@formfacade/embed-react 在 2026/10/16 – 2026/11/14 这 30 天内被下载 2,116 次,日均约 71 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@formfacade/embed-react 还在维护吗?

最新版本 1.1.2 发布于 2024/11/08(2 年前);至今共发布 10 个版本,其中过去 12 个月发布了 0 个;首次发布于 2024/02/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。