The NameRecorderMixin class records details of all input fields used by a form. When the form element is closed, a hidden field named __albform__ containing these details is added to the form.
When processing a request, the merge_request() method only
merges fields with ctx.locals
when they match the details found
in the submitted __albform__ field.
) |
) |
) |
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 ApplicationError exception.
) |
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.
Request fields not listed in __albform__ are ignored.