营销人员Web表单-以编程方式提交表单数据 [英] Web Forms for Marketers - Submit form data programmatically

查看:105
本文介绍了营销人员Web表单-以编程方式提交表单数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在确定是否在我当前正在从事的项目中包括面向营销人员的Web表单".该网站将是具有丰富UI的响应式设计,因此我希望完全控制表单的呈现,例如标签,输入字段等,而不必修改WFFM SitecoreSimpleFormAscx.ascx文件或关联的CSS文件.

I'm currently scoping whether or not to include Web Forms for Marketers on a project I'm currently working on. The web site will be a responsive design with a rich UI and so I would like to have full control over the rendering of the form, e.g. labels, input fields etc and would rather not have to modify the WFFM SitecoreSimpleFormAscx.ascx file or the associated css file.

当前是否可以使用C#代码将某些表单数据提交到已经在Sitecore中创建的行销商网络表单"表单中(假设我了解所有字段)? WFFM参考指南有一个代码段,用于访问已提交的Web表单数据,但仅用于提交一些内容.

Is there currently any way, using C# code, to submit some form data to a Web Forms for Marketers form that is already created in Sitecore (assuming I have knowledge of all the fields)? The WFFM reference guide has a code snippet for accessing already submitted web form data but nothing for just submitting some.

推荐答案

如果您不想深入研究表单的自定义控件,则可以尝试通过响应式JavaScript通过POST执行到包含WFFM表单的页面的操作页.或者,您可以在页面上嵌入和隐藏wffm表单,然后再次用脚本特技驱动它.我认为第二种方法会更好,因为它可以让您更直接地响应验证失败.

If you don't want to dig into custom controls for the forms you might try performing a POST to a page that contains the WFFM form via JavaScript from your responsive page. Alternatively you could embed and hide the wffm form on your page and stunt drive it with script again. I think the second approach would be better as it would allow you to more directly respond to validation failures.

这篇关于营销人员Web表单-以编程方式提交表单数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆