Select¶
Overview¶
Use Select to predefine a list of values.
Make field¶
Collapsar will assume the field if you pass only pass 1 parameter. You can define the label and field this way:
from collapsar.fields.Select import Select
Select('Role', 'role_type').options([
'user',
'mod',
'admin'
])
Defining keys¶
If you want to set a custom label for your option, you can set it using a list of dict.