FoxitPDFSDKforWeb v11.0.1
Foxit PDF SDK for Web
|
Public Member Functions | |
async | addOption (item:ChoiceOptionItem) |
Adds an option to the end of the list box or combo box. More... | |
async | deleteOption (index:number) |
Deletes an option by index from the list box or combo box. More... | |
describeFieldFlags () | |
Retrieves the flag options for the current field. More... | |
getAdditionalAction () | |
Retrives the additional action object. More... | |
getAlignment () | |
Retrieves the field's alignment. More... | |
async | getAlternateName () |
Get alternate name. More... | |
getDefaultValue () | |
Retrieves the default value of the field. More... | |
getExtType () | |
Retrieves the extended type information for the current form field. More... | |
getFlags () | |
Retrieves the field's flags. More... | |
getMappingName () | |
Get mapping name. More... | |
getMaxLength () | |
Retrieves the maximum length of the text field. More... | |
getName () | |
Retrives the name of the form field. More... | |
getOptions () | |
Retrieves combo box and list box options. More... | |
getOptionsSize () | |
Retrieves the number of options available in the list box or combo box. More... | |
getType () | |
Get form field's type. More... | |
getValue () | |
Get field value. More... | |
async | getWidget (index:number) |
Get widget annot with specified index. Please call PDFFormField.getWidgetsCount to get count. More... | |
getWidgetsCount () | |
Get the count of field's controls. More... | |
async | insertOption (index:number, item:ChoiceOptionItem) |
Inserts an option at the specified index. More... | |
isCheckedByDefault () | |
Checks if the field is checked by default. More... | |
async | isReadonly () |
Check if the field is read only. More... | |
async | isRequired () |
Check if the field is required. More... | |
async | moveOption (srcIndex:number, destIndex:number) |
Moves an option from one index to another. More... | |
async | selectOption (index:number) |
Selects an option by index in the list box or combo box. More... | |
async | setAlignment (alignment:number) |
Sets the field's alignment (not applicable for signature fields). More... | |
async | setAlternateName (alternateName:string) |
Set alternate name. More... | |
setCheckedByDefault (checked:boolean) | |
Sets the default checked state of the field. More... | |
setDefaultValue (defaultValue:string) | |
Sets the default value of the field. More... | |
async | setMappingName (mappingName:string) |
Set mapping name. (Not support signature field). More... | |
async | setMaxLength (maxLength:number) |
Sets the maximum length for the text field. More... | |
async | setOptions (options:{ label:string;value:string;selected:boolean;defaultSelected:boolean;}[]) |
Sets the options (items) for a list box or combo box. More... | |
setValue (value:string, isTriggerEvent=true) | |
Set field value. More... | |
updateFlagByOptions (options:Partial< FieldFlagOptions >) | |
Updates the field's flags based on the given options. More... | |
async | updateOption (index:number, itemOptions:Partial< ChoiceOptionItem >) |
Updates an option at a specified index. More... | |
![]() | |
addDestroyHook (...hooks) | |
Add a function to destroyHooks list, which will be called during destroy. More... | |
destroy () | |
ownsTo (owner) | |
Establishes an ownership relationship where this instance will be destroyed when the owner is destroyed. Additionally, the owner will be automatically removed from the destroyHooks list when this instance is destroyed. More... | |
PDF Form Field object
Field
|
inline |
Adds an option to the end of the list box or combo box.
item | ChoiceOptionItem - The option to add. |
|
inline |
Deletes an option by index from the list box or combo box.
index | number - The index of the option to delete. |
|
inline |
|
inline |
Retrives the additional action object.
|
inline |
Retrieves the field's alignment.
|
inline |
Get alternate name.
An alternate field name to be used in place of the actual field name wherever the field must be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.
|
inline |
Retrieves the default value of the field.
|
inline |
Retrieves the extended type information for the current form field.
|
inline |
Retrieves the field's flags.
|
inline |
Get mapping name.
Mapping name is to be used when exporting interactive form field data from the document.
|
inline |
Retrieves the maximum length of the text field.
|
inline |
Retrives the name of the form field.
|
inline |
Retrieves combo box and list box options.
|
inline |
Retrieves the number of options available in the list box or combo box.
|
inline |
Get form field's type.
Unknown:0; PushButton:1; CheckBox:2; RadioButton:3; ComboBox:4; ListBox:5; Text:6; Sign:7; Barcode:8
|
inline |
Get field value.
|
inline |
Get widget annot with specified index. Please call PDFFormField.getWidgetsCount to get count.
index | Number - Index of widget. |
|
inline |
Get the count of field's controls.
|
inline |
Inserts an option at the specified index.
index | number - The position where the new option will be inserted. |
item | ChoiceOptionItem - The option to be inserted. |
|
inline |
Checks if the field is checked by default.
|
inline |
Check if the field is read only.
|
inline |
Check if the field is required.
|
inline |
Moves an option from one index to another.
srcIndex | number - The source index of the option. |
destIndex | number - The destination index of the option. |
|
inline |
Selects an option by index in the list box or combo box.
index | number - The index of the option to select. |
|
inline |
Sets the field's alignment (not applicable for signature fields).
alignment | Alignment - The alignment to set. |
|
inline |
Set alternate name.
An alternate field name is to be used in place of the actual field name wherever the field must be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.
alternateName | string - A new alternate name string. |
|
inline |
Sets the default checked state of the field.
checked | boolean - The checked state to set by default. |
|
inline |
Sets the default value of the field.
defaultValue | string - The default value to be set. |
|
inline |
Set mapping name. (Not support signature field).
Mapping name is to be used when exporting interactive form field data from the document.
If current form field is a signature field, this function will do nothing.
mappingName | string - A new mapping name string. |
|
inline |
Sets the maximum length for the text field.
maxLength | number - Specifies the maximum text length (0 means no limit). |
Error | if maxLength is less than 0. |
|
inline |
Sets the options (items) for a list box or combo box.
Applicable for list box and combo box fields. For other field types, this function does nothing.
options | Array<{label: string, value: string, selected: boolean, defaultSelected: boolean}> - An array of options to set for the list box or combo box. For Example: [ { label: "label0", value: "value0", selected: true, defaultSelected: true }, { label: "label1", value: "value1", selected: false, defaultSelected: false } ] |
|
inline |
Set field value.
value | string - Field's value to be set. |
isTriggerEvent | boolean - Whether to trigger DataEvents.formFieldPropertyUpdated event after setting value. Default is true . |
setValue
will be ignored. Please use FormFillerEditorAPI instead. FormFillerService.getEditorAPI FormFillerEditorAPI
|
inline |
Updates the field's flags based on the given options.
options | Partial<FieldFlagOptions> - The options used to update the field flags. |
|
inline |
Updates an option at a specified index.
index | number - The index of the option to update. |
itemOptions | Partial<ChoiceOptionItem> - The new values for the option. |