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

Converts the current form to an inline form.

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

Returns the text from the current form.

Clear()

Clears the current form.

GetWrapperShape(): ApiShape

Returns a shape in which the form is placed to control the position and size of the fixed size form frame.

SetPlaceholderText(sText): boolean

Sets the placeholder text to the current form.

SetTextPr(oTextPr): boolean

Sets the text properties to the current form.

GetTextPr(): ApiTextPr

Returns the text properties from the current form.

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).