[英]simple captcha field type for meteor autoform
I need a simple captcha field type for my form. 我的表单需要一个简单的验证码字段类型。 I used meteor-autoform for generating form.
我用meteor-autoform生成表格。
I don't know how to create custom (captcha) field type for auto-form. 我不知道如何为自动表单创建自定义(验证码)字段类型。
For example how to wrap this node.js module to auto-form add-on. 例如,如何将此 node.js模块包装为自动格式加载项。
I also don't want to use google reCaptcha. 我也不想使用谷歌reCaptcha。
Please guide me. 请指导我。
Ok a common issue when building with meteor is figuring out how to include node packages in a meteor project. 使用meteor进行构建时,常见的问题是如何在流星项目中包含节点包。 Here's the way I do it!
这就是我的方式!
meteor add meteorhacks:npm
The packages.json file should something like this: packages.json文件应该是这样的:
{
"node-captcha" : "0.2.1"
}
Note: 0.2.1 is the latest package version of node-captcha which I found on the npm link you supplied. 注意:0.2.1是我在你提供的npm链接上找到的node-captcha的最新包版本。 Anytime you are including a node package using meteorhacks:npm, you need to list a node package version.
每当您使用meteorhacks包含节点包时:npm,您需要列出节点包版本。
Meteor.npmRequire('node-captcha');
This should do the trick! 这应该做的伎俩! Please accept my answer if this is what you are looking for :)
如果这是你要找的话,请接受我的回答:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.