[Zope] Re: Form Variable Types, special: record literals SOLVED

hans hans@beehive.de
Fri, 23 Nov 2001 14:16:06 +0000


hans wrote:

> in a DTML-Document i have
>
>   <form  name="check" action="<dtml-var document_id>" method="GET" >
>   <input type="text" name="person.fname:record:string" value="???" />
>   <input type="text" name="person.lname:record:string" value="???" />
>   (actually abt. 20 fields).
>    <input type="submit" value=" Check " /></form>
>
> i want to initialize person once so that i can write
>   <input type="text" name="person.lname:record:string"
>                               value="person.lname" />

...

> to avoid writing
>   <input type="text" name="person.fname:record:string"
>                                value="<dtml-if
> "REQUEST.has_key('person')><dtml-var person.fname>
>                                           <dtml-else><dtml-var "">"
>   />
> 20 times.
> Using 2 DTML-Documents could mean "layout drift" between 2 documents
> which should look equal.
> Is there a way to initialize a record via <dtml-call "REQUEST.set( )">
> or any other elegant solution?

i overlooked the dtml-var missing attribute
  <input type="text" name="person.lname:record:string"
                              value="<dtml-var person.lname missing="">
/>