# AcroFormComboBox

## AcroForm~ AcroFormComboBox

#### new AcroFormComboBox()

Source:
  - modules/acroform.js, line 1951

### Extends

- AcroFormListBox
- AcroFormChoiceField
- AcroFormField

### Members

#### color :string|rgba

Source:
  - modules/acroform.js, line 1311
Inherited From:
  - AcroFormField#color
Default Value:
  - 'black'

The color of the text

##### Type:

- string | rgba

#### combo :boolean

Source:
  - modules/acroform.js, line 1796
Overrides:
  - AcroFormChoiceField#combo
Default Value:
  - false

If set, the field is a combo box; if clear, the field is a list box.

##### Type:

- boolean

#### commitOnSelChange :boolean

Source:
  - modules/acroform.js, line 1910
Inherited From:
  - AcroFormChoiceField#commitOnSelChange
Default Value:
  - false

(PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step. This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.

##### Type:

- boolean

#### defaultValue :any

Source:
  - modules/acroform.js, line 1377
Inherited From:
  - AcroFormField#defaultValue
Default Value:
  - null

(Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.

##### Type:

- any

#### doNotSpellCheck :boolean

Source:
  - modules/acroform.js, line 1888
Inherited From:
  - AcroFormChoiceField#doNotSpellCheck
Default Value:
  - false

(PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.

##### Type:

- boolean

#### edit :boolean

Source:
  - modules/acroform.js, line 1818
Inherited From:
  - AcroFormChoiceField#edit
Default Value:
  - false

If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.

##### Type:

- boolean

#### fieldName :string

Source:
  - modules/acroform.js, line 1210
Inherited From:
  - AcroFormField#fieldName
Default Value:
  - null

(Optional) The partial field name (see 12.7.3.2, “Field Names”).

##### Type:

- string

#### fontName :string

Source:
  - modules/acroform.js, line 1229
Inherited From:
  - AcroFormField#fontName
Default Value:
  - 'helvetica'

The fontName of the font to be used.

##### Type:

- string

#### fontSize :number

Source:
  - modules/acroform.js, line 1267
Inherited From:
  - AcroFormField#fontSize
Default Value:
  - 0 (for auto)

The fontSize of the font to be used.

##### Type:

- number

#### fontStyle :string

Source:
  - modules/acroform.js, line 1248
Inherited From:
  - AcroFormField#fontStyle
Default Value:
  - 'normal'

The fontStyle of the font to be used.

##### Type:

- string

#### (readonly) hasAnnotation :boolean

Source:
  - modules/acroform.js, line 1471
Inherited From:
  - AcroFormField#hasAnnotation

Check if field has annotations

##### Type:

- boolean

#### (readonly) hasAppearanceStream :boolean

Source:
  - modules/acroform.js, line 1503
Inherited From:
  - AcroFormField#hasAppearanceStream

true if field has an appearanceStream

##### Type:

- boolean

#### height :number

Source:
  - modules/acroform.js, line 1142
Inherited From:
  - AcroFormField#height
Default Value:
  - null

The height of the field.

##### Type:

- number

#### maxFontSize :number

Source:
  - modules/acroform.js, line 1286
Inherited From:
  - AcroFormField#maxFontSize
Default Value:
  - 0 (for auto)

The maximum fontSize of the font to be used.

##### Type:

- number

#### multiSelect :boolean

Source:
  - modules/acroform.js, line 1866
Inherited From:
  - AcroFormChoiceField#multiSelect
Default Value:
  - false

(PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected

##### Type:

- boolean

#### noExport :boolean

Source:
  - modules/acroform.js, line 1587
Inherited From:
  - AcroFormField#noExport
Default Value:
  - false

If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)

##### Type:

- boolean

#### page :number

Source:
  - modules/acroform.js, line 1522
Inherited From:
  - AcroFormField#page

The page on which the AcroFormField is placed

##### Type:

- number

#### readOnly :boolean

Source:
  - modules/acroform.js, line 1543
Inherited From:
  - AcroFormField#readOnly
Default Value:
  - false

If set, 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.

##### Type:

- boolean

#### required :boolean

Source:
  - modules/acroform.js, line 1565
Inherited From:
  - AcroFormField#required
Default Value:
  - false

If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).

##### Type:

- boolean

#### showWhenPrinted :boolean

Source:
  - modules/acroform.js, line 1019
Inherited From:
  - AcroFormField#showWhenPrinted
Default Value:
  - true

(PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen. NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.

##### Type:

- boolean

#### sort :boolean

Source:
  - modules/acroform.js, line 1843
Inherited From:
  - AcroFormChoiceField#sort
Default Value:
  - false

If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).

##### Type:

- boolean

#### textAlign :string

Source:
  - modules/acroform.js, line 1630
Inherited From:
  - AcroFormField#textAlign
Default Value:
  - 'left'

(Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text: 'left', 'center', 'right'

##### Type:

- string

#### topIndex :number

Source:
  - modules/acroform.js, line 1704
Inherited From:
  - AcroFormChoiceField#topIndex
Default Value:
  - 0

(Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.

##### Type:

- number

#### value :any

Source:
  - modules/acroform.js, line 1444
Inherited From:
  - AcroFormField#value
Default Value:
  - null

(Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.

##### Type:

- any

#### width :number

Source:
  - modules/acroform.js, line 1121
Inherited From:
  - AcroFormField#width
Default Value:
  - null

The width of the field.

##### Type:

- number

#### x :number

Source:
  - modules/acroform.js, line 1079
Inherited From:
  - AcroFormField#x
Default Value:
  - null

The x-position of the field.

##### Type:

- number

#### y :number

Source:
  - modules/acroform.js, line 1100
Inherited From:
  - AcroFormField#y
Default Value:
  - null

The y-position of the field.

##### Type:

- number

### Methods

#### addOption(value)

Source:
  - modules/acroform.js, line 1759
Inherited From:
  - AcroFormChoiceField#addOption

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | string |

#### getOptions() → {array}

Source:
  - modules/acroform.js, line 1734
Inherited From:
  - AcroFormChoiceField#getOptions

##### Returns:

array of Options

Type
  array

#### removeOption(value, allEntries)

Source:
  - modules/acroform.js, line 1775
Inherited From:
  - AcroFormChoiceField#removeOption

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | string |
`allEntries` | boolean | (default: false)

#### setOptions(value)

Source:
  - modules/acroform.js, line 1745
Inherited From:
  - AcroFormChoiceField#setOptions

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | array |