Gets or sets the description of the field.
The description is displayed below the input. If set, it overrides the default description coming from SharePoint.
Supports resource keys with the RESX. prefix (e.g. "RESX.MyFieldDescription").
The key is resolved from the form's Resources translation table.
Gets or sets whether the field is hidden.
ReadonlyinternalGets the internal name that is used for the field.
ReadonlyoriginalGets original field value before any changes. This value is not updated when the field value is changed.
Gets or sets whether the field is read-only.
Gets or sets whether the field requires a value.
Gets or sets the title (label) of the field.
The title is displayed in the field header. If set, it overrides the default title coming from SharePoint.
Supports resource keys with the RESX. prefix (e.g. "RESX.MyFieldTitle").
The key is resolved from the form's Resources translation table.
ReadonlytypeGets the type of the field.
Gets or sets the user(s) by Id. User(s) can be set also by native SharePoint field value format or IPrincipalInfo object. User returns IPrincipalInfo object or IPrincipalInfo object array, if multiple on field is supported. For setting user(s) by login name (UPN or claim token), use the setValue method.
// usage in onInitComplete event (allow synchronous operations with user field)
const { form } = tisa;
const { myField } = tisa.form.field;
// get user field value
const value = myField.value;
console.log(value);
// set single user by Id
myField.value = 1;
// set single user by User object
myField.value = { Id: 1, LoginName: "user1@example.com", Title: "Name of User 1" };
// set single user by native SharePoint field value format
myField.setValue("1#;Name of User 1");
// set multiple users by Id
myField.value = [1, 2, 3];
// set multiple users by User objects
myField.value = [{ Id: 1, LoginName: "user1@example.com", Title: "Name of User 1" }, { Id: 2, LoginName: "user2@example.com", Title: "Name of User 2" }, { Id: 3, LoginName: "user3@example.com", Title: "Name of User 3" }];
// set multiple users by native SharePoint field value format
myField.setValue(["1#;Name of User 1", "2#;Name of User 2", "3#;Name of User 3"]);
// clear user field value
myField.value = null;
myField.value = [];
// reset user field value to original value
myField.value = myField.originalValue;
// usage in onInit event (only asynchronous operations with user field are allowed)
const { form } = tisa;
const { myField } = tisa.form.field;
// get user field value
const value = await myField.value;
console.log(value);
// set single user by login name (upn or claim token)
await myField.setValue("john.doe@example.com");
const newValue = await myField.value;
console.log(newValue);
Protectedgetgets field property from tisaFields (TiSaProvider.tsx)
Subscribes to field value changes.
callback invoked when the value changes
Protectedsetsets field property in tisaFields (TiSaProvider.tsx)
Sets a field value and waits for the value to be evaluated or rendered in the UI. Also allows disabling the onChange event trigger.
the value to set
OptionaldisableTriggerChange: booleanwhen true, the onChange event is not raised
The user field type is used to display a user or a list of users on a SharePoint item.
Inherits core field functionality from Field, including:
Example