interface FormFieldType {
    checkControl: (
        controlIndex: number,
        checked: boolean,
        notify: boolean,
    ) => Promise<boolean>;
    getAlternateName: () => Promise<string>;
    getControlByIndex: (index: number) => Promise<null | FormControlType>;
    getControlsCount: () => Promise<number>;
    getFieldDict: () => Promise<null | PDFDictionaryType>;
    getFieldFlags: () => Promise<number>;
    getFieldType: () => Promise<number>;
    getFullName: () => Promise<string>;
    getOptionsCount: () => Promise<number>;
    insertOption: (
        optLabel: string,
        index: number,
        notify: boolean,
    ) => Promise<number>;
    options?: Options;
    setAlternateName: (name: string) => Promise<void>;
    setFieldFlags: (flags: number) => Promise<void>;
    setOptionValue: (
        index: number,
        optValue: string,
        notify: boolean,
    ) => Promise<boolean>;
    setValue: (value: string, notify: boolean) => Promise<boolean>;
    getInterForm(): Promise<null | InterFormType>;
}

Implemented by

Properties

checkControl: (
    controlIndex: number,
    checked: boolean,
    notify: boolean,
) => Promise<boolean>

Checks the state of a control in the form field.

Type declaration

    • (controlIndex: number, checked: boolean, notify: boolean): Promise<boolean>
    • Parameters

      • controlIndex: number

        The index of the control to check.

      • checked: boolean

        Whether the control should be checked or not.

      • notify: boolean

        Whether to notify changes.

      Returns Promise<boolean>

      • Returns true if the control state was successfully checked, otherwise false.
getAlternateName: () => Promise<string>

get alternate name

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

      • Returns the alternate name of the form field
getControlByIndex: (index: number) => Promise<null | FormControlType>

get control by index

Type declaration

    • (index: number): Promise<null | FormControlType>
    • Parameters

      • index: number

        The index of the control to retrieve

      Returns Promise<null | FormControlType>

      • Returns the form control object at the specified index
getControlsCount: () => Promise<number>

get controls count

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      • Returns the count of controls
getFieldDict: () => Promise<null | PDFDictionaryType>

get field dictionary

Type declaration

getFieldFlags: () => Promise<number>

get field flags

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      • Returns the field flags as a number
getFieldType: () => Promise<number>

get field type

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      • Returns the field type as a number
getFullName: () => Promise<string>

get full name

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

      • Returns the full name of the form field
getOptionsCount: () => Promise<number>

Gets the count of options in the form field.

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      • Returns the count of options in the form field.
insertOption: (
    optLabel: string,
    index: number,
    notify: boolean,
) => Promise<number>

Inserts an option into the form field at a specified index.

Type declaration

    • (optLabel: string, index: number, notify: boolean): Promise<number>
    • Parameters

      • optLabel: string

        The label of the option to insert.

      • index: number

        The index at which to insert the option.

      • notify: boolean

        Whether to notify changes.

      Returns Promise<number>

      • Returns the index of the inserted option.
options?: Options
setAlternateName: (name: string) => Promise<void>

set alternate name

Type declaration

    • (name: string): Promise<void>
    • Parameters

      • name: string

        The alternate name to set for the form field

      Returns Promise<void>

      • No return value
setFieldFlags: (flags: number) => Promise<void>

set field flags

Type declaration

    • (flags: number): Promise<void>
    • Parameters

      • flags: number

        The flags to set for the form field

      Returns Promise<void>

      • No return value
setOptionValue: (
    index: number,
    optValue: string,
    notify: boolean,
) => Promise<boolean>

Sets the value of an option at a specified index in the form field.

Type declaration

    • (index: number, optValue: string, notify: boolean): Promise<boolean>
    • Parameters

      • index: number

        The index of the option to set.

      • optValue: string

        The value to set for the option.

      • notify: boolean

        Whether to notify changes.

      Returns Promise<boolean>

      • Returns true if the option value was set successfully, otherwise false.
setValue: (value: string, notify: boolean) => Promise<boolean>

set field value

Type declaration

    • (value: string, notify: boolean): Promise<boolean>
    • Parameters

      • value: string

        The value to set for the form field

      • notify: boolean

        Whether to notify changes

      Returns Promise<boolean>

      • Returns true if the value was set successfully, otherwise false

Methods