The NameRecorderMixin class writes the names of all input fields in a form to a hidden field named __albform__ at the end of the form.
When the browser submits a form with this field the application
merge_request() method calls the merge_request()
method of this class to merge the browser request into
ctx.locals
.
) |
) |
) |
itype, name [, value = None ][, return_list = 0 ]) |
As fields are added to each form the value of the return_list argument is checked against any previous setting of the argument for the same field name. The argument value is also checked against whether or not there are multiple instances of the field name. An detected discrepancy between the argument value and actual fields will raise a FieldTypeError exception.
Input field types radio, image, and submit are implicitly flagged to return a list of values.
) |
If an input field has been flagged to return a list (via the
list tag attribute) then the method will create a list in
ctx.locals
for the field regardless of the number of values
sent by the browser. An empty list is created when the field is
missing from the browser request.