Changes between Version 21 and Version 22 of S3/FilterForms


Ignore:
Timestamp:
03/27/13 11:02:43 (9 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/FilterForms

    v21 v22  
    7373=== S3OptionsFilter ===
    7474
    75   * tbw
     75S3TextFilter renders checkboxes to select pre-determined options for a field in the resource.
    7676
     77{{{
     78instance = S3OptionsFilter(field, _class="class", _name="name", options=None, represent=None, widget=None)
     79}}}
     80
     81Parameters:
     82
     83  - '''field''' is a field selector (or a list of field selectors) for the field(s) to filter by
     84
     85Options:
     86
     87  - '''options''' is a dict {value:label} of options for the widget, or a callable that returns such a dict
     88  - '''represent''' is a callable to render a label for each option
     89  - '''widget''' selects the widget, either "checkboxes" (S3 grouped checkboxes, default) or "multiselect" (jQuery UI Multiselect-Dropdown by Eric Hynds) or "multiselect-bootstrap" (Bootstrap Multiselect-Dropdown)
     90  - '''comment''' is a help text or tooltip widget to render with the filter widget
     91
     92HTML Attributes:
     93
     94  - '''_class''' is the CSS class for the input field
     95  - '''_size''' is the input field width in characters
     96  - '''_name''' is a name for the input field
     97
     98Note: if no '''options''' are specified, the widget will determine the options from the field (=all unique values for this field currently available in the DB)
     99Note: if no '''represent''' is specified, the widget will use the labels specified in '''options''', or otherwise use the field representation function
     100Note: if the field is a foreign key, then '''represent''' can also be a string template for the referenced rows
    77101=== S3DateFilter ===
    78102