c# - 使用 Sitecore Webforms For Marketers 生成摘要报告

标签 c# asp.net .net sitecore web-forms-for-marketers

我将 Sitecore 与 Webforms For Marketers (WFFM) 插件一起使用。使用 WFFM,我创建了多个表单。所有表格都正常工作,但某些表格在生成摘要报告时发生错误。

Value cannot be null.
Parameter name: items

Stack trace:
[ArgumentNullException: Value cannot be null.
Parameter name: items]
   Sitecore.Form.UI.Converters.ListItemsAdapter.AdaptList(IList list) +330
   Sitecore.Form.Core.Utility.FieldReflectionUtil.ListAdapt(FieldItem field) +258
   Sitecore.Forms.Data.PoolManager.GetInitialApplicants(FieldItem fieldItem) +49
   Sitecore.Forms.Data.PoolManager.GetApplicants(FieldItem item, IEnumerable`1 polls, Boolean onlyDefined) +136
   Sitecore.Forms.Shell.UI.FormDataViewerPage.LoadSummary() +476
   Sitecore.Forms.Shell.UI.FormDataViewerPage.SummaryRender() +43
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3554

您可以通过单击 Sitecore 开始按钮 -> Web Forms for Marketers -> Form Reports 来生成摘要报告。选择一个表单并单击摘要选项卡。

我查看了工作和不工作的表格 - 我的结论是我没有发现配置上的差异。奇怪的是,每一个表格都正确地存储了数据。有人有解决方案吗?

非常感谢。

乔迪

最佳答案

我的猜测是您没有覆盖 Result 的类来输出您的自定义字段。

这是一个带有文本框的自定义 RadioList 的示例。输出是用户选择的任何内容,除非用户选择了 radioList 中的最后一项,他/她必须提供其他信息。

   public override ControlResult Result
        {
            get
            {
                return new ControlResult(this.ControlName,
                                     (this.buttonList.SelectedItem != null 
                                        && this.buttonList.SelectedIndex == this.buttonList.Items.Count - 1
                                        && !string.IsNullOrEmpty(this.InputText.Text)) ?
                                     this.buttonList.SelectedItem.Text + ", " + this.InputText.Text :
                                     (this.buttonList.SelectedItem != null? this.buttonList.SelectedItem.Text  : string.Empty),
                                      this.buttonList.SelectedValue ?? string.Empty);

            }
        }

希望这会有所帮助, 动态

关于c# - 使用 Sitecore Webforms For Marketers 生成摘要报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21778381/

相关文章:

c# - 带有信用卡支付方式的 Paypal Rest API

c# - 从字符串中匹配英语词典单词

c# - 如何向 WebRequest 添加 cookie?

c# - 在 Getter Setter 中使用 Session 时发生堆栈溢出异常

c# - 使用二维数组和方法的乘法表

c# - 运行存储过程时无法解释的超时

c# - 在哪里以及如何使用嵌套类?

c# - 方法包含默认参数值

c# - 提供给 ChannelFactory 的 InstanceContext 包含一个未实现 CallbackContractType 的 UserObject

c# - 显示属于域用户的组