Single-select dropdown field type. Trims string values on sanitize.
Example
field :status, :select do
options [{"Draft", :draft}, {"Published", :published}]
include_nil "Any"
endBlank choice
A select draws an empty choice ahead of its options according to the field:
ui placeholderset - the empty choice is labelled with it, required or notrequired true, or adefaultset - no empty choice- otherwise - an empty choice labelled "Select..."
See MishkaGervaz.Form.Behaviours.FieldType and MishkaGervaz.Form.Types.Field.
Summary
Functions
The label of the empty choice a form select draws ahead of its options, or nil when it draws
none.
Functions
The label of the empty choice a form select draws ahead of its options, or nil when it draws
none.
Takes the field map (ui, required and default are read from it) and returns the ui
placeholder when one is set, nil for a required field or one with a default, and the
translated "Select..." for any other.