Skip to main content

MdField

Struct MdField 

Source
pub struct MdField {
Show 16 fields pub kind: u8, pub form: u32, pub name: String, pub id: String, pub value: String, pub label: String, pub placeholder: String, pub checked: bool, pub options: Vec<MdOption>, pub selected: i32, pub size: u32, pub rows: u32, pub maxlength: u32, pub disabled: bool, pub readonly: bool, pub node: MdNode,
}
Expand description

a field of a form (its first value: the view keeps the current one, MdViewState)

Fields§

§kind: u8

MF_*

§form: u32

its form: index + 1 into MdDoc::forms (0: none – it sends nothing)

§name: String§id: String§value: String

text fields: the text; check boxes, radios, buttons: the value sent (“on” for check boxes and radios without one)

§label: String

the name screen readers say (aria-label, the

§placeholder: String§checked: bool

check boxes and radios: checked at first

§options: Vec<MdOption>

drop-down lists: the choices, the one chosen at first (-1: none)

§selected: i32§size: u32

text fields: the width in characters (size; text areas: cols; 0: the default), text areas: the lines (rows)

§rows: u32§maxlength: u32

at most this many characters (0: no limit)

§disabled: bool§readonly: bool§node: MdNode

its element (,