如何使用隐藏字段创建Meteor.js联系表单

时间:2015-06-15 23:45:01

标签: meteor meteor-autoform

我真的无法弄清楚如何在发送电子邮件的Meteor应用程序中获取联系表单。它需要能够绘制会话变量和用户电子邮件等信息,然后将其发送,最好使用Mailgun API发送到电子邮件帐户。

我曾尝试过教程或similar questions on here,当然还有阅读文档,但对于看似简单的事情,我已经深入了解。是的,正如你可能已经意识到的那样,我在这方面非常初学......所以......!

1 个答案:

答案 0 :(得分:0)

我不确定我是否收到您的问题,但如果您想在表单中添加隐藏字段,只需在type="hidden"模板中添加afFieldInput选项即可。

{{#autoForm schema="mySchema" id="myContactForm" type="normal"}}
   {{> afFieldInput name='email' type='hidden'}}
   ...
{{/autoform}}
处理联系表单的

There's an example in the official docs(虽然没有隐藏字段)。