ApiFormBase

class ApiFormBase

Description

Class representing a document form base.

Instance Methods

GetClassType(): form

Returns a type of the ApiFormBase class.

GetFormType(): FormType

Returns a type of the current form.

GetFormKey(): string

Returns the current form key.

SetFormKey(sKey): boolean

Sets a key to the current form.

GetTipText(): string

Returns the tip text of the current form.

SetTipText(sText): boolean

Sets the tip text to the current form.

IsRequired(): boolean

Checks if the current form is required.

SetRequired(bRequired): boolean

Specifies if the current form should be required.

IsFixed(): boolean

Checks if the current form is fixed size.

ToFixed(nWidth, nHeight): boolean

Converts the current form to a fixed size form.

ToInline(): boolean

C.

SetBorderColor(r, g, b, bNone): boolean

Sets the border color to the current form.

SetBackgroundColor(r, g, b, bNone): boolean

Sets the background color to the current form.

GetText(): string

R.

Clear()

Clears the current form.

GetWrapperShape(): ApiShape

R.

SetPlaceholderText(sText): boolean

S.

SetTextPr(oTextPr): boolean

S.

GetTextPr(): ApiTextPr

R.

MoveCursorOutside(isAfter)

Places a cursor before/after the current form.

Copy(): ApiForm

Copies the current form (copies with the shape if it exists).

Extends By

ApiTextFormApiFormBase

Class representing a document text field.

ApiComboBoxFormApiFormBase

Class representing a document combo box / dropdown list.

ApiCheckBoxFormApiFormBase

Class representing a document checkbox / radio button.

ApiPictureFormApiFormBase

Class representing a document picture form.

ApiDateFormApiFormBase

Class representing a document date field.

ApiComplexFormApiFormBase

Class representing a complex field.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).