On Wed, Feb 20, 2008 at 01:10:57PM +0100, Hermann Himmelbauer wrote:
> Hi, I have here an add form which is based on an interface like this:
> 
> class IMyObj(Interface):
>   value1 = TextLine()
>   value2 = TextLine()
>   
> In my add form, I need to display a default value for "value2". This default 
> value is stored in another object, however, no default value should be given 
> for value1.
> 
> I'm desperatingly trying to implement this via z3c.form through various ways, 
> but none seems to work.

I am not familiar with z3c.form (being stuck with maintaining a project
based on Zope 3.2 means you don't get to play with new toys).

With zope.formlib you could solve this by passing an initial data dict
to the setUpWidgets call.  Doesn't z3c.form have something like that?

You mentioned that you looked at the source where the widgets were
updated.  I suggest you look at the place where the widgets are created
& initialized.

Marius Gedminas
-- 
"Nothing ever goes missing that they don't look at me, ever since that
time I lost my horse. As if that could be helped. He was white and it
was snowing, what did they expect?"
                -- Dolorous Edd in "A Storm of Swords" by George R. R. Martin

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to