select_multiple | Using search box |
This field plug-in allows you to dynamically filter a pre-loaded choice list, much like using the selected() function in a choice filter.
This field plug-in is built on the select_one-select_multiple field plug-in, so it has all of the capabilities of that field plug-in. It also has the capabilities of the search-select-one and search-select-multiple field plug-in, so you can enumerators can also use a search box to find the choices they need.
If you have never pre-loaded choices before, check out our documentation on loading multiple-choice options from pre-loaded data, as well as this webinar.
This plug-in is currently under beta. If you you find a problem with the field plug-in, please email support@surveycto.com.
- Exclude specified choices with exceptions.
- Only include specified choices, while excluding all others.
- Optional search box to allow enumerators to find choices more easily.
- All of the capabilities of the select_one-select_multiple field plug-in.
To learn how to customize the field plug-in, check out the parameters below,.
Data will be stored in the same format as the original field type. For a select_one field, it will store the value of the selected choice. For a select_multiple field, it will store the values of the selected choices in a space-separated list.
To use this field plug-in as-is, just download the preload-filter.fieldplugin.zip file from this repo, and attach it to your form.
To use with the sample form:
- Download the sample form and media files from this repo. The media file includes the data file with the pre-loaded choices.
- Download the preload-filter.fieldplugin.zip file from this repo.
- Upload the form to your server with the ZIP files attached.
All parameters are optional, but they are needed to filter the choices.
Name | Description |
---|---|
exclude |
A space-separated list of choice values that should be excluded. For example, if this parameter has a value of '2 3' , then the choices with values of 2 and 3 will not appear in the choice list. All other choices will appear. |
include |
A space-separated list of choice values that should be included. If If both |
search |
If this parameter has a value of 1 , then a search box will appear. The enumerator can use this to search for field labels so they are easier to find. |
Feature / Property | Support |
---|---|
Supported field type(s) | select_one , select_multiple |
Default values | Yes |
Custom constraint message | Yes |
Custom required message | Yes |
Read only | Yes |
media:image | Yes |
media:audio | Yes |
media:video | Yes |
quick appearance |
Yes (select_one only) |
minimal appearance |
Yes (select_one only) |
compact appearance |
No |
compact-# appearance |
No |
quickcompact appearance |
No |
quickcompact-# appearance |
No |
likert appearance |
Yes (select_one only) |
likert-min appearance |
Yes* (select_one only) |
likert-mid appearance |
No |
label appearance |
Yes |
list-nolabel appearance |
Yes |
*Note: this plug-in works well for the likert-min appearance when the field label is short, and does not contain an image, audio, or video. This is currently a known limitation.
-
Sample form
You can find the sample form definition here. You will also need the media files. -
Test form
If you are a developer, and you would like to expand on this field plug-in, you can use this form definition for testing, which uses different field property values. It uses the same media files. -
Developer documentation
More instructions for developing and using field plug-ins can be found here: https://github.com/surveycto/Field-plug-in-resources