[Zope] Form Variable Types, special: record literals

hans hans@beehive.de
Thu, 22 Nov 2001 17:02:31 +0000


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" />

(or, <dtml-with person>
                 <input type="text" name="person.lname:record:string"
value="lname" />
       </dtml-with>
)

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?