| 84 | | instance = S3OptionsFilter(field, _class="class", _name="name", options=None, represent=None, widget=None, comment=None) |
| 85 | | }}} |
| 86 | | |
| 87 | | Parameters: |
| 88 | | |
| 89 | | - '''field''' is a field selector (or a list of field selectors) for the field(s) to filter by |
| 90 | | |
| 91 | | Options: |
| 92 | | |
| 93 | | - '''options''' is a dict {value:label} of options for the widget, or a callable that returns such a dict |
| 94 | | - '''represent''' is a callable to render a label for each option |
| 95 | | - '''widget''' selects the widget, either "groupedopts" (S3 grouped checkboxes, default) or "multiselect" (jQuery UI Multiselect-Dropdown by Eric Hynds) or "multiselect-bootstrap" (Bootstrap Multiselect-Dropdown) |
| 96 | | - '''comment''' is a help text or tooltip widget to render with the filter widget (only rendered by S3FilterForm) |
| 97 | | |
| 98 | | HTML Attributes: |
| 99 | | |
| 100 | | - '''_class''' is the CSS class for the input field |
| 101 | | - '''_name''' is a name for the input field |
| | 84 | instance = S3OptionsFilter(field, |
| | 85 | label=None, |
| | 86 | options=None, |
| | 87 | represent=None, |
| | 88 | widget=None, |
| | 89 | _class="class", |
| | 90 | _name="name", |
| | 91 | comment=None) |
| | 92 | }}} |
| | 93 | |
| | 94 | '''Parameters''': |
| | 95 | |
| | 96 | ||'''Parameter'''||'''Type'''||'''Explanation'''||'''Default'''|| |
| | 97 | ||field||string||field selector for the field to filter by ''(required)''||-|| |
| | 98 | ||label||string or lazyT||the label for the fitler widget||None|| |
| | 99 | ||options||dict or callable||dict {value:label} of options for the widget, or a callable that returns such a dict||None|| |
| | 100 | ||represent||callable||a callable to render a label for an option||None|| |
| | 101 | ||widget||string||selects the widget, either "groupedopts" (S3 grouped checkboxes) or "multiselect" (jQuery UI Multiselect-Dropdown by Eric Hynds) or "multiselect-bootstrap" (Bootstrap Multiselect-Dropdown)||"groupedopts"|| |
| | 102 | ||_class||string||the CSS class for the input field||None|| |
| | 103 | ||_name||string||name for the input field||None|| |
| | 104 | ||comment||string or HTML widget||help text or tooltip widget to render with the filter widget (only rendered by S3FilterForm)||None|| |