[]
        
(Showing Draft Content)

RadioButtonField

DsPdfJS API v9.1.0


DsPdfJS API / RadioButtonField

Class: RadioButtonField

Represents group of radio buttons.

Extends

Constructors

Constructor

new RadioButtonField(om): RadioButtonField

Creates a new RadioButtonField.

Parameters

om

ObjectManager

ObjectManager that controls the lifetime of the RadioButtonField.

Returns

RadioButtonField

Overrides

Field.constructor

Constructor

new RadioButtonField(): RadioButtonField

Creates a new RadioButtonField.

Returns

RadioButtonField

Overrides

Field.constructor

Accessors

alternateName

Get Signature

get alternateName(): string | null

Gets or sets 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.

Returns

string | null

Set Signature

set alternateName(value): void

Gets or sets 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.

Parameters
value

string | null

Returns

void

Inherited from

Field.alternateName


calculationIndex

Get Signature

get calculationIndex(): number

Gets or sets an index that is used to determine the field's calculation order. Fields with lower indices are calculated before fields with higher indices.

If several fields have the same CalculationIndex, the calculation order is determined by the order of fields in the collection.

recalculateValue can be used to specify JavaScript that is used to calculate the field's value.

Returns

number

Set Signature

set calculationIndex(value): void

Gets or sets an index that is used to determine the field's calculation order. Fields with lower indices are calculated before fields with higher indices.

If several fields have the same CalculationIndex, the calculation order is determined by the order of fields in the collection.

recalculateValue can be used to specify JavaScript that is used to calculate the field's value.

Parameters
value

number

Returns

void

Inherited from

Field.calculationIndex


children

Get Signature

get children(): FieldCollection

Gets the list of child fields.

Returns

FieldCollection

Inherited from

Field.children


defaultValue

Get Signature

get defaultValue(): string | number | boolean | number[] | null

Gets or sets the field's default value.

Returns

string | number | boolean | number[] | null

Set Signature

set defaultValue(value): void

Gets or sets the field's default value.

Parameters
value

string | number | boolean | number[] | null

Returns

void

Inherited from

Field.defaultValue


doc

Get Signature

get doc(): PdfDocument | null

Gets the PdfDocument owning this field.

Returns

PdfDocument | null

Inherited from

Field.doc


export

Get Signature

get export(): boolean

Gets or sets a value indicating whether the field must not be exported by a ActionSubmitForm action.

Returns

boolean

Set Signature

set export(value): void

Gets or sets a value indicating whether the field must not be exported by a ActionSubmitForm action.

Parameters
value

boolean

Returns

void

Inherited from

Field.export


formatValue

Get Signature

get formatValue(): ActionJavaScript | null

Gets or sets a JavaScript action to be performed before the field is formatted to display its current value. This action can modify the field's value before formatting.

Returns

ActionJavaScript | null

Set Signature

set formatValue(value): void

Gets or sets a JavaScript action to be performed before the field is formatted to display its current value. This action can modify the field's value before formatting.

Parameters
value

ActionJavaScriptProperties | ActionJavaScript | null

Returns

void

Inherited from

Field.formatValue


id

Get Signature

get id(): number

Gets the reference to the object.

Returns

number

Inherited from

Field.id


justification

Get Signature

get justification(): VariableTextJustification | null

Gets or sets the justification to be used in displaying the field's text. Note that this field is used only if WidgetAnnotation#justification is not specified.

Returns

VariableTextJustification | null

Set Signature

set justification(value): void

Gets or sets the justification to be used in displaying the field's text. Note that this field is used only if WidgetAnnotation#justification is not specified.

Parameters
value

VariableTextJustification | null

Returns

void

Inherited from

Field.justification


keyPress

Get Signature

get keyPress(): ActionJavaScript | null

Gets or sets a JavaScript action to be performed when the user types a keystroke into a text field or combo box or modifies the selection in a scrollable list box. This action can check the keystroke for validity and reject or modify it.

Returns

ActionJavaScript | null

Set Signature

set keyPress(value): void

Gets or sets a JavaScript action to be performed when the user types a keystroke into a text field or combo box or modifies the selection in a scrollable list box. This action can check the keystroke for validity and reject or modify it.

Parameters
value

ActionJavaScriptProperties | ActionJavaScript | null

Returns

void

Inherited from

Field.keyPress


mappingName

Get Signature

get mappingName(): string | null

Gets or sets the mapping name to be used when exporting interactive form field data from the document.

Returns

string | null

Set Signature

set mappingName(value): void

Gets or sets the mapping name to be used when exporting interactive form field data from the document.

Parameters
value

string | null

Returns

void

Inherited from

Field.mappingName


name

Get Signature

get name(): string | null

Gets or sets the field's name.

Returns

string | null

Set Signature

set name(value): void

Gets or sets the field's name.

Parameters
value

string

Returns

void

Inherited from

Field.name


om

Get Signature

get om(): ObjectManager

Gets the owner ObjectManager instance.

Returns

ObjectManager

Inherited from

Field.om


opt

Get Signature

get opt(): string[] | null

Gets or sets an array of strings containing one entry for each widget annotation, defining export values for its constituent radio buttons. See the PDF spec for details.

Returns

string[] | null

Set Signature

set opt(value): void

Gets or sets an array of strings containing one entry for each widget annotation, defining export values for its constituent radio buttons. See the PDF spec for details.

Parameters
value

string[] | null

Returns

void


owner

Get Signature

get owner(): FieldCollection | null

Gets the FieldCollection containing this field.

Returns

FieldCollection | null

Inherited from

Field.owner


parent

Get Signature

get parent(): Field | null

Gets the parent field.

Returns

Field | null

Inherited from

Field.parent


radiosInUnison

Get Signature

get radiosInUnison(): boolean

Gets or sets a value indicating whether a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).

Returns

boolean

Set Signature

set radiosInUnison(value): void

Gets or sets a value indicating whether a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).

Parameters
value

boolean

Returns

void


readOnly

Get Signature

get readOnly(): boolean

Gets or sets a value indicating whether the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.

Returns

boolean

Set Signature

set readOnly(value): void

Gets or sets a value indicating whether the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.

Parameters
value

boolean

Returns

void

Inherited from

Field.readOnly


recalculateValue

Get Signature

get recalculateValue(): ActionJavaScript | null

Gets or sets a JavaScript action to be performed to recalculate the value of this field when that of another field changes.

Returns

ActionJavaScript | null

Set Signature

set recalculateValue(value): void

Gets or sets a JavaScript action to be performed to recalculate the value of this field when that of another field changes.

Parameters
value

ActionJavaScriptProperties | ActionJavaScript | null

Returns

void

Inherited from

Field.recalculateValue


required

Get Signature

get required(): boolean

Gets or sets a value indicating whether the field must have a value at the time it is exported by a ActionSubmitForm action.

Returns

boolean

Set Signature

set required(value): void

Gets or sets a value indicating whether the field must have a value at the time it is exported by a ActionSubmitForm action.

Parameters
value

boolean

Returns

void

Inherited from

Field.required


value

Get Signature

get value(): string | number | boolean | number[] | null

Gets or sets the field's value.

Returns

string | number | boolean | number[] | null

Set Signature

set value(value): void

Gets or sets the field's value.

Parameters
value

string | number | boolean | number[] | null

Returns

void

Inherited from

Field.value


valueChanged

Get Signature

get valueChanged(): ActionJavaScript | null

Gets or sets a JavaScript action to be performed when the field's value is changed. This action can check the new value for validity.

Returns

ActionJavaScript | null

Set Signature

set valueChanged(value): void

Gets or sets a JavaScript action to be performed when the field's value is changed. This action can check the new value for validity.

Parameters
value

ActionJavaScriptProperties | ActionJavaScript | null

Returns

void

Inherited from

Field.valueChanged


widgets

Get Signature

get widgets(): FieldWidgetCollection

Gets the list of widget annotations associated with this field.

Returns

FieldWidgetCollection

Inherited from

Field.widgets

Methods

addItem()

addItem(page, bounds, checkStyle?, borderStyle?): WidgetAnnotation

Creates a new WidgetAnnotation and adds it to the Field#widgets collection.

Parameters

page

PdfPage

The page on which the new WidgetAnnotation will be placed.

bounds

Rect

The bounds of the new WidgetAnnotation on "page".

checkStyle?

CheckStyle = CheckStyle.Circle

The check mark style.

borderStyle?

BorderStyle = BorderStyle.Solid

The border style.

Returns

WidgetAnnotation

Returns the created WidgetAnnotation object.


free()

free(): void

Detaches the object from the ObjectManager and deallocates its memory, if possible.

Returns

void

Inherited from

Field.free


rebind()

rebind(omTo): void

Rebinds the object from the current ObjectManager to the specified one.

Parameters

omTo

ObjectManager

The new ObjectManager for the object.

Returns

void

Inherited from

Field.rebind