1. Put an 'update' method definition in the thingy content type Interface and Class Implementation.
2. Created a custom thingy Page Template for the edit form.
3. Used template="thingy_template.pt" and class="site.thingy.thingyClass" definitions in the editform configuration. (No custom widgets.)
Seems very simple! I guess the problem for the Zope 3 newcomer is knowing which bits if the framework to use and which to replace.
Roger Ineichen wrote:
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cliff Ford Sent: Thursday, April 14, 2005 9:43 AM To: Zope3email@example.com Subject: [Zope3-Users] Form for list of lists
I have a list of lists that I need to manipulate with a form. I have figured out how to get the list elements into a form with a Page Template. However, the field names come out like this:
0 field.listname.0. field.listname.1. field.listname.2. 1 field.listname.0. field.listname.1. field.listname.2. 2 field.listname.0. field.listname.1. field.listname.2. ...
where the first integer is just the value of repeat/item/index and the first element represents listname.
I have a widget derived from SimpleInputWidget to handle the form elements (all strings).
I don't know how to get the updated form values back into the list of lists, or even the best/correct approach to this whole problem. Can anyone provide some pointers?
Use the Field "List" in your interface for describe the list attribute.
Then use the standard "editform" directive with the right schema and all is handled by the form framework.
Then you should get values like:
field.list.0.name.0 field.list.0.name.1 field.list.0.name.2 field.list.1.name.0 field.list.1name.1 field.list.1.name.2
If you like to use a own edit form, you can call
for get a value. But make sure the fields have unique numbers.
Right now it seams each row uses the same numbers.
Regards Roger Ineichen
PS: Has yesterday's question from Dylan Reinhardt been answered off-list? I will be doing the same thing next and was interested in any answers.
Zope3-users mailing list
_______________________________________________ Zope3-users mailing list Zope3firstname.lastname@example.org http://mail.zope.org/mailman/listinfo/zope3-users