PloneFormGen 中的 Likert 选项是否可以设置为在作为电子邮件提交并存储在数据适配器中时显示带有答案的问题

Can the Likert option in PloneFormGen be set to display the questions with the answers when submitted as an email and stored in the data adapter

我们在Plone 4.3.2中使用PloneFormGen 提交Likert字段时,它只提交问题编号和答案。它没有提交问题。

这是一个例子:

如果列是:

非常不同意 不同意 既不同意也不反对 同意 非常同意

第一个问题是

1.I class 每天使用评估来监督学生的学习。

提交的答案类似于

1:不同意

如果提交者选择了不同意。我们需要的是

1.I class 每天使用评估来监督学生的学习。 -不同意

或其他包含问题的格式。

谢谢, 乔

它是一个 bug in PloneFormGen:它确实有生成从属 dl 的代码,但它只是 运行 如果存在方法 len 但它不存在无论如何都不会调用它。

不幸的是,你无法通过 ZMI 真正修复它,但如果有人勇敢地(或愚蠢地)在 buildout-cache/eggs 文件夹中找到自己的 formLikertField.py,并在那里,绕行139,删除或注释掉

中的中间行
    if not (safe_hasattr(value, 'get') and
            safe_hasattr(value, 'len') and
            len(value)):

有人会收到这样的邮件:

Overall title
Question Number One
Strongly disagree
Question Number Two
Disagree