【发布时间】:2012-11-24 03:15:44
【问题描述】:
我正在尝试在我的敏捷内容类型上创建自定义添加表单。我已按照此链接中的说明进行操作:http://plone.org/products/dexterity/documentation/manual/developer-manual/advanced/forms
在我的内容类型中:
class BusinessTransactionFormAddForm(dexterity.AddForm):
grok.name('ebpls.app.businesstransactionform')
对于我的模板 businesstransactionformaddform.pt,我使用了此链接中的布局:http://dexterity-developer-manual.readthedocs.org:8000/en/latest/schema-driven-forms/customising-form-presentation/layout-templates.html
我之所以要自定义添加表单,是因为我想插入 jQuery 来计算来自 DataGrid 字段的值。我插入javascript没有问题。唯一的问题是,在网页上,它创建了两个表单,分别位于上、下,即相同类型的字段被复制到另一个的底部。我使用的模板有问题吗?有谁知道添加视图的正确模板是什么?谢谢!
【问题讨论】: