BaseFormCustomizer class

This is the base class that third parties should extend when implementing a client-side extension that provides a custom list form (display, new, edit) for a SharePoint list.

Extends

BaseExtension<TProperties>

Properties

context

Use the context object to access common services and state associated with the component.

displayMode

Display mode of the form: Edit, Display or New.

domElement

This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole DOM subtree of the form.

Methods

dispose()

Disposes the component.

formClosed()

Call this method after the form has been closed/cancelled to inform the application that the form has been closed.

formSaved()

Call this method after the form has been saved to inform the application that the form has been saved.

render()

This API is called to render the form. There is no base implementation of this API and the form is required to override this API.

Property Details

context

Use the context object to access common services and state associated with the component.

readonly context: FormCustomizerContext;

Property Value

Remarks

Child classes are expected to override this field by redeclaring it with a specialized type. It is meant to be a read-only property; the type cannot be declared as read-only in the base class (because it is initialized outside the constructor), but child classes should redeclare it as readonly.

displayMode

Display mode of the form: Edit, Display or New.

protected get displayMode(): FormDisplayMode;

Property Value

domElement

This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole DOM subtree of the form.

protected get domElement(): HTMLElement;

Property Value

HTMLElement

Method Details

dispose()

Disposes the component.

dispose(): void;

Returns

void

Remarks

Please, do not override this method. Override the onDispose method instead.

formClosed()

Call this method after the form has been closed/cancelled to inform the application that the form has been closed.

protected formClosed(): void;

Returns

void

formSaved()

Call this method after the form has been saved to inform the application that the form has been saved.

protected formSaved(): void;

Returns

void

render()

This API is called to render the form. There is no base implementation of this API and the form is required to override this API.

protected abstract render(): void;

Returns

void