[Zope] Where does "field_" prefix come from in Formulator fields?

Clemens Robbenhaar robbenhaar@espresto.com
Mon, 4 Nov 2002 21:43:39 +0100


Hi Skip,

 > It appears that when expanding a Formulator form field a "field_" prefix
 > gets tacked onto the field name.  For example, one field I have is named
 > "postal_code".  When this
 > 
 >   <td tal:content="structure here/form/postal_code/render">item</td>
 > 
 > is rendered it expands to
 > 
 >   <td><input size="10" value="" type="text" name="field_postal_code"  /></td>
 > 
 > although I named to the object "postal_code", not "field_postal_code".
 > Where does "field_" come from and how can I get rid of it?

the 'field_' is intentionally added by Formulator to detect its "own"
request parameters.

 You cannot get rid of it (except severly hacking Formulator, maybe).
Instead You may want to call the validation methods,  e.g. in a script:

 result = form.validate_all(context.REQUEST)
 postal_code = result['postal_code']

IIRC, this is either discussed in the Online Help or somewhere
at the formulator home page http://www.zope.org/Members/faassen/Formulator