开发者

Developing a new dexterity widget and field

开发者 https://www.devze.com 2023-04-08 23:29 出处:网络
I need to develop a dexterity content type with a particular field/widget. This widget is like a multiselection widget but I need to give the

I need to develop a dexterity content type with a particular field/widget.

This widget is like a multiselection widget but I need to give the possibility to upload a file for every choosen opti开发者_如何学运维on. Something like this:

[]  option 1 Upload a file: [              ] [ Browse ]

[X] option 2 Upload a file: [              ] [ Browse ]

[]  option 3 Upload a file: [              ] [ Browse ]

Any idea/pointer on how to implement this on dexterity? I think it has to do with z3c.form mostly. Any example of similar widget/field is welcome, as any pointer to existing packages :)

I would also manage the vocabulary TTW, if possible, so users with a particular role can update the list.


Though I haven't used this myself I suspect you could look at collective.z3cform.datagridfield and the related demo code on github for pointers on how to use subforms and widget factories.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号