PloneFormGen的主从窗口小部件 [英] Master slave widget for PloneFormGen

查看:81
本文介绍了PloneFormGen的主从窗口小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在类似于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的主从窗口小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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