Skip to content
import { BarcodeScannerInput, ComboBoxInput, DatePickerInput, DateTimeOffsetPickerInput, DateTimePickerInput } from "@arcgis/core/form/elements/inputs.js";
Since
ArcGIS Maps SDK for JavaScript 4.16

A convenience module for importing Input classes when developing with TypeScript. For example, rather than importing form element inputs one at a time like this:

import BarcodeScannerInput from "@arcgis/core/form/elements/inputs/BarcodeScannerInput.js";
import ComboBoxInput from "@arcgis/core/form/elements/inputs/ComboBoxInput.js";
import DatePickerInput from "@arcgis/core/form/elements/inputs/DatePickerInput.js";
import DateTimeOffsetPickerInput from "@arcgis/core/form/elements/inputs/DateTimeOffsetPickerInput.js";
import DateTimePickerInput from "@arcgis/core/form/elements/inputs/DateTimePickerInput.js";
import RadioButtonsInput from "@arcgis/core/form/elements/inputs/RadioButtonsInput.js";
import SwitchInput from "@arcgis/core/form/elements/inputs/SwitchInput.js";
import TextAreaInput from "@arcgis/core/form/elements/inputs/TextAreaInput.js";
import TextBoxInput from "@arcgis/core/form/elements/inputs/TextBoxInput.js";
import TimePickerInput from "@arcgis/core/form/elements/inputs/TimePickerInput.js";

You can use this module to import them on a single line:

import { BarcodeScannerInput, ComboBoxInput, DatePickerInput, DateTimeOffsetPickerInput, DateTimePickerInput, RadioButtonsInput, SwitchInput, TextAreaInput, TextBoxInput, TimePickerInput } from "@arcgis/core/form/elements/inputs.js";

This module also allows you to implement type guards on the form element inputs, making your code smarter.

import { Input } from "@arcgis/core/form/elements/inputs.js";
function logFormElementInput(input: Input): void {
if (input.type === "text-area") {
console.log("Form element input type is TextAreaInput");
}
else {
// The compiler knows the content element must be an input type such as `text-area` | `text-box` | `barcode-scanner` | `radio-buttons` | `combo-box`, etc.
console.log("The value is not a valid form element input.")
}
}
See also

Type definitions

BarcodeScannerInput

Type definition

The BarcodeScannerInput class defines the desired user interface is a barcode or QR code scanner. If this type is used in an ArcGIS Maps SDK for JavaScript web application, it will default to the TextBoxInput type as the API does not support bar code scanning as an input type.

Supertypes
default

ComboBoxInput

Type definition

The ComboBoxInput class defines the desired user interface for a combo box group.

Supertypes
default

DatePickerInput

Type definition

The DatePickerInput class defines the desired user interface for working with date-only types.

Supertypes
default

DateTimeOffsetPickerInput

Type definition

The DateTimeOffsetPickerInput class defines the desired user interface for editing date and time fields in a form that also requires the option to include an offset from Coordinated Universal Time (UTC).

Supertypes
default

DateTimePickerInput

Type definition

The DateTimePickerInput class defines the desired user interface for editing date (including time) fields in a form.

Supertypes
default

RadioButtonsInput

Type definition

The RadioButtonsInput class defines the desired user interface for a radio button group.

Supertypes
default

SwitchInput

Type definition

The SwitchInput class defines the desired user interface for a binary switch or toggle. This should be used when selecting between two options in a form.

Supertypes
default

TextAreaInput

Type definition

TextAreaInput defines the desired user interface is a multi-line text area.

Supertypes
default

TextBoxInput

Type definition

TextBoxInput defines the desired user interface is a single-line text box.

Supertypes
default

TimePickerInput

Type definition

The TimePickerInput class defines the desired user interface for working with time-only types.

Supertypes
default

Variables

BarcodeScannerInput

Variable

The BarcodeScannerInput class defines the desired user interface is a barcode or QR code scanner. If this type is used in an ArcGIS Maps SDK for JavaScript web application, it will default to the TextBoxInput type as the API does not support bar code scanning as an input type.

Type
typeof BarcodeScannerInputClass

ComboBoxInput

Variable

The ComboBoxInput class defines the desired user interface for a combo box group.

Type
typeof ComboBoxInputClass

DatePickerInput

Variable

The DatePickerInput class defines the desired user interface for working with date-only types.

Type
typeof DatePickerInputClass

DateTimeOffsetPickerInput

Variable

The DateTimeOffsetPickerInput class defines the desired user interface for editing date and time fields in a form that also requires the option to include an offset from Coordinated Universal Time (UTC).

Type
typeof DateTimeOffsetPickerInputClass

DateTimePickerInput

Variable

The DateTimePickerInput class defines the desired user interface for editing date (including time) fields in a form.

Type
typeof DateTimePickerInputClass

RadioButtonsInput

Variable

The RadioButtonsInput class defines the desired user interface for a radio button group.

Type
typeof RadioButtonsInputClass

SwitchInput

Variable

The SwitchInput class defines the desired user interface for a binary switch or toggle. This should be used when selecting between two options in a form.

Type
typeof SwitchInputClass

TextAreaInput

Variable

TextAreaInput defines the desired user interface is a multi-line text area.

Type
typeof TextAreaInputClass

TextBoxInput

Variable

TextBoxInput defines the desired user interface is a single-line text box.

Type
typeof TextBoxInputClass

TimePickerInput

Variable

The TimePickerInput class defines the desired user interface for working with time-only types.

Type
typeof TimePickerInputClass