Check if input is required.
var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
console.log(ctrl.required);
Set input required / not required.
var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
ctrl.required = true;
Checks control validity.
const validityResult = await ix.api.dom.getControl("<GUID>").checkValidity();
// example of `validityResult` - field is required, but was not filled
ValidationInfo {
valStatus: false,
valMessage: 'Please make a selection',
valType: 'required'
}
The checkbox control is a fundamental UI element that allows users to select or deselect an option. It is typically used to represent Boolean data (true/false or yes/no). The state of the checkbox (checked or unchecked) reflects the underlying Boolean value it is associated with.
This control can function both as an input element, allowing users to change the value, and as a view element, displaying the current value. The visual representation of the checkbox in the browser (selected or not selected) corresponds to the Boolean value it represents.