Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 24 and Version 25 of SimpleWidgetForm


Ignore:
Timestamp:
08/23/06 05:24:43 (13 years ago)
Author:
jonas
Comment:

Added comment about how to set values - took me a day to find out

Legend:

Unmodified
Added
Removed
Modified
  • SimpleWidgetForm

    v24 v25  
    135135}}} 
    136136 
     137If you want to preset the values - for instance to edit already existing data - use the following form: 
     138 
     139{{{ 
     140#!python 
     141  ${example_form(default=data, action="sample")} 
     142}}} 
     143 
     144with the data in the form of a dictionary: 
     145 
     146{{{ 
     147#!python 
     148  data = dict([('test', 'Hello World'),]) 
     149}}} 
     150 
    137151The form strips off the submit field so that you don't have to deal with it. 
    138152If you do want to manage the submit button, add a `widget.Submit` to your 
     
    202216the scope of this tutorial. 
    203217 
    204 Form Processing 
    205 --------------- 
     218== Form Processing == 
     219 
    206220As part of validation, the values of the form will be converted to the 
    207221appropriate python objects (this example is all strings, but if you used an