Call JS/TS Functions from XML
Introduction
Syntax & Basic Example
$:myFunctionName(myParameter)<var name="form" type="application_form" />
<button label="Save" disabled="$:isDisabled(view.form)" disabled-message="Complete all fields before saving" on-press=":$saveForm()"/>function isDisabled(form) {
if (form && form.details_pending) {
return true;
}
else {
return false;
}
}What goes on in the background
JavaScript AND Operator
Passing View Variables
Format Strings
JS/TS events (e.g. on-press, on-change)
on-press, on-change)object-table fields
object-table fieldsOther common XML attributes
Attribute
Added Support
Examples
Last updated