Provides access to form fields.
Gets the values of all fields in the form. The values are stored in a dictionary with the field internal name as the key and the field value as the value.
Provides access to form groups.
Gets a value indicating whether the form does not allow to edit the item.
Gets a value indicating whether the form is currently editable.
The isEditableForm property is true when either isNewForm or isEditForm is true.
const { form } = tisa;
const { myField1, myField2, myField3 } = tisa.form.field;
if (form.isEditableForm) {
// set read-only property for some fields
myField1.readOnly = true;
myField2.readOnly = false;
// set required property for some fields
myField2.required = true;
// set value for some fields
myField3.value = "test";
}
Gets a value indicating whether the form allows to edit the item.
Gets a value indicating whether the item does not yet exist and the form allows to fill in its metadata.
True if the form displays a task to complete.
Provides print template functionality for the current form.
Gets or sets the editability of the form. Locks all editable fields when set to true.
Sets the active form definition by name. The name must match one of the Form.CustomFormDefinitions | CustomFormDefinitions defined in the form JSON config.
Can only be called during onFormInit. Throws if called after init or if the name is not found.
Name of the custom form definition to activate.
Provides the interface for form management. It allows to manage fields, groups, and other properties. For detailed information on managing specific elements, refer to the Field and Group classes.
Example