问题描述
是否存在类似于PloneFormGen的主从组件"?用户在哪里选择第一选择A,它将为选择B(如下)生成选择列表?
Does there exist anything akin "Master Slave Widget" for PloneFormGen? Where the user choices first choice A which would generate the list of choices for choice B (below) to select?
推荐答案
这远不是理想的答案,但是我已经使用PFG覆盖将JavaScript注入标头中多次这样做.这仅适用于相对简单的决策树.
This is a far less than ideal answer, but I've done this several times with JavaScript injected into the header with a PFG override. It's only practical for relatively simple decision trees.
基本过程是在加载时隐藏所有辅助控件,然后在单击事件指示控件选择时将其显示出来.将辅助控件分组到字段集中也很方便:然后您可以将控件作为一个组显示和隐藏.
The basic procedure is to on-load hide all the subsidiary controls, then reveal them as click events indicate a controlling choice. Grouping subsidiary controls into fieldsets is also handy: then you may show and hide controls as a group.
这篇关于PloneFormGen的主从窗口小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!