Input field
Example#
Code-example#
<measmatic-input-field data-id=0 type=text></measmatic-input-field>
<measmatic-input-field data-id=1 type=text value=VT-34></measmatic-input-field>
<measmatic-input-field data-id=2 type=number optional></measmatic-input-field>
<measmatic-input-field data-id=3 type=number value=123></measmatic-input-field>
<measmatic-input-field class=warning data-id=4 type=number value=12></measmatic-input-field>
<measmatic-input-field data-id=5 type=checkbox checked></measmatic-input-field>
<measmatic-input-field data-id=6 label=float type=float value=1.234></measmatic-input-field>
<measmatic-input-field data-id=7 label=integer type=integer value=1></measmatic-input-field>
<measmatic-input-field data-id=8 type=text value=disabled disabled></measmatic-input-field>
<measmatic-card highlight-header>
<measmatic-input-field data-id=9 type=text value=highlight-header></measmatic-input-field>
<measmatic-input-field data-id=10 type=text value=content></measmatic-input-field>
</measmatic-card>
Measmatic-input-field#
This custom-element will create a input-field and is used f.e. measmatic-input.
Attributes
data-idrequired to initialize your control with measmatictypesupported types arenumber(= float datatype),float,integer(positive whole numbers),textandcheckbox(default: number)checkedcheckes control whentype="checkbox"valuepresets a value for controls with the type ofnumber,float,integerortextoptionalcontrol requires no inputdisableddisables the input-field, can be added or removed at any time
Setter/Getter
valuesets/gets value of input-fielddisabledsets/gets if the input-field is disabledcheckedsets/gets boolean whentype="checkbox"toggle()switch states whentype="checkbox"inputType = :stringsets/gets type of input (number,float,integer,text,checkbox)resetInputType()resets the property inputType and inputField.type to the value of the correspondingtype-attribute