package mechaml

  1. Overview
  2. Docs

Module Form.SelectListSource

Operations on Menus (select lists)

Sourcetype item

Type of an item of the list

Sourceval items : select_list input -> item list

Return all items of a given list

Sourceval is_multiple : select_list input -> bool

Check if the select list supports multiple selection

Sourceval selected : t -> select_list input -> string list

Return a list of selected items as strings

Sourceval select : t -> select_list input -> item -> t

Select a specific item. If multiple selection is not enabled, this unselect any previously selected item

Sourceval unselect : t -> select_list input -> item -> t

Unselect a specific item

Sourceval is_selected : t -> select_list input -> item -> bool

Check if the specified item is selected

Sourceval text : item -> string

Label of an item

Sourceval value : item -> string

Value (as sent in form data) of an item

Sourceval selected_default : t -> select_list input -> string list

Items with the attribute selected set

Sourceval reset : t -> checkbox input -> t

Reset the select list to its default value, meaning that only the items with the selected attribute will be selected

OCaml

Innovation. Community. Security.