multiselect
Description
Wpart responsible for boolean values. The values fetched from the HTML form are kept as an true or false atoms.
This wpart is rendered to multiple <input type="checkbox" ... />.
Validation
option |
format |
description |
error message |
always |
["ValK", "ValN", ...] |
checks if the fields have the required value |
{not_all_mandatory_fields_checked, Vals} |
HTML meta-attributes
name |
format |
description |
options |
"Val1:Desc1 | Val2:Desc2 | ..." |
The options could be selected. The string is actually a list of possible options: they are separated with a | character (pipe). Each of the choice consists of value that should be set as an HTML value (and passed to the validator) and human-readable description (rendered only on form, not present in the persistence layer). Value and description are separated with : sign (colon). |
selected |
"Val1|Val2|Val3" |
The values that should be preselected. The delimiter is a | (pipe). |
Examples
Records definitions
...
{multiselect, [{always, [dog, rhino]},
%% other parameters
]
},
...
HTML tag
<wpart:multiselect options="dog:Doggy|cat:Kitten|rhino:Other" selected="cat|rhino" OTHER_HTML_ATTRIBUTES />
