# Class: WidgetFlags

## Core.Annotations. WidgetFlags

#### new WidgetFlags(options)

  An object that describes flags on a Widget, or other PDF objects.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `options` | Object | <nullable> | Define the set of supported flags.

### Members

#### <static> COMB

  If set, the field shall be automatically divided into as many equally spaced positions as the value of the max length.

  ##### Type:

  - string

#### <static> COMBO

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

  ##### Type:

  - string

#### <static> COMMIT_ON_SEL_CHANGE

  If set, the new value shall be committed as soon as a selection is made.

  ##### Type:

  - string

#### <static> DO_NOT_SCROLL

  If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle.

  ##### Type:

  - string

#### <static> DO_NOT_SPELL_CHECK

  If set, text entered in the field shall not be spell-checked.

  ##### Type:

  - string

#### <static> EDIT

  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.

  ##### Type:

  - string

#### <static> FILE_SELECT

  If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.

  ##### Type:

  - string

#### <static> MULTI_SELECT

  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:

  - string

#### <static> MULTILINE

  If set, the field may contain multiple lines of text.

  ##### Type:

  - string

#### <static> NO_EXPORT

  If set, the field shall not be exported by a submit-form action.

  ##### Type:

  - string

#### <static> NO_TOGGLE_TO_OFF

  (Radio buttons only) If set, exactly one radio button shall be selected at all times.

  ##### Type:

  - string

#### <static> PASSWORD

  If set, the field is intended for entering a secure password that should not be echoed visibly to the screen.

  ##### Type:

  - string

#### <static> PUSH_BUTTON

  If set, the field is a pushbutton that does not retain a permanent value.

  ##### Type:

  - string

#### <static> RADIO

  If set, the field is a set of radio buttons; if clear, the field is a checkbox.

  ##### Type:

  - string

#### <static> RADIOS_IN_UNISON

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

  ##### Type:

  - string

#### <static> READ_ONLY

  If set, the user may not change the value of the field.

  ##### Type:

  - string

#### <static> REQUIRED

  If set, the field shall have a value at the time it is exported by a submit-form action.

  ##### Type:

  - string

#### <static> RICH_TEXT

  If set, the value of this field shall be a rich text string.

  ##### Type:

  - string

#### <static> SORT

  If set, the field’s option items shall be sorted alphabetically.

  ##### Type:

  - string

### Methods

#### get(flag)

  Determine if the given flag is set.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `flag` | string | The name of the flag to check

  ##### Returns:

  Whether the flag is set
  Type
    boolean

#### set(options [, shouldSet])

  Set flags to true or false. If options is an array of strings, set the flags with those names to true. If options is a number or array of numbers, set the flags from the corresponding numbers to true. (deprecated, relies on a limited interpretation of numbers as bitfields) If options is a string, set that flag to shouldSet.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `options` | Array.<string> | Array.<number> | string | number |  | One of the possible input types to determine which flags to set
  `shouldSet` | boolean | <optional> | If options is a string, whether to set or unset the flag

#### Search results