[Zope] Formulator--pre-selecting a line in a multiline field

Dieter Fischer dieter.fischer@grid-it.ch
Mon, 21 Jul 2003 19:35:58 +0200


Hello

> Does anyone know how to preset the selected field in a multiline
> field in a Forumlator form.

Here an example in DTML:

When you loop over the fields of the formulator, you must asure that you
call the fields with the default values.

 <dtml-var "field.render(REQUEST.form[field.getId()],REQUEST)">

This example is ok, when you come from an other DTML-Method/Document, where
you show the values of the record. There you have to have something like
this:

 <INPUT TYPE="HIDDEN" NAME="sex_code:int" VALUE="<dtml-var sex_code
null="">">

Important is the ":int". If you're not using it, you'll never get the
default value.

HTH

Dieter