【发布时间】:2020-06-16 09:44:18
【问题描述】:
只是想知道是否有人有使用 react.js 嵌入 Hubspot 表单的经验
我们的一个页面中嵌入了一个 hubspot 表单。
这是设置表单的当前代码组件:
<HubspotForm
portalId="xxxxxxx"
formId="xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
onSubmit={() => null}
onReady={() => this.registerListeners()}
loading={<div>Loading...</div>}
css={hubspotcss}
cssClass="hubspotForm"
/>
我要做的就是修改企业电子邮件字段的错误消息。所以我检查了https://developers.hubspot.com/docs/methods/forms/advanced_form_options
并找到自定义国际化部分来覆盖错误消息。据我所知,我需要添加以下代码:
locale="en"
translations= {
en= {
forbiddenEmailDomain= "Please enter a company email address"
}
}
但是当我编译代码时出现错误: 错误 'locale' is not defined no-undef
任何人都必须知道我做错了什么? 任何信息都非常感谢
谢谢 乔尔斯
【问题讨论】:
标签: javascript reactjs gatsby hubspot