1# @ohos.application.formInfo (formInfo) 2 3The **formInfo** module provides types and enums related to the widget information and state. 4 5> **NOTE** 6> 7> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8> This module is deprecated since API version 9. You are advised to use [formInfo](js-apis-app-form-formInfo.md) instead. 9 10## Modules to Import 11 12```ts 13import formInfo from '@ohos.application.formInfo'; 14``` 15 16## FormInfo 17 18Describes widget information. 19 20**System capability**: SystemCapability.Ability.Form 21 22| Name | Type | Readable | Writable | Description | 23| ----------- | -------- |-------- | -------------------- | ------------------------------------------------------------ | 24| bundleName | string | Yes | No | Name of the bundle to which the widget belongs. | 25| moduleName | string | Yes | No | Name of the module to which the widget belongs. | 26| abilityName | string | Yes | No | Name of the ability to which the widget belongs. | 27| name | string | Yes | No | Widget name. | 28| description | string | Yes | No | Description of the widget. | 29| type | [FormType](#formtype) | Yes | No | Type of the widget. Currently, only JS widgets are supported.| 30| jsComponentName | string | Yes | No | Name of the component used in the JS widget. | 31| colorMode | [ColorMode](#colormode) | Yes | No | Color mode of the widget. | 32| isDefault | boolean | Yes | No | Whether the widget is the default one. | 33| updateEnabled | boolean | Yes | No | Whether the widget is updatable. | 34| formVisibleNotify | boolean | Yes | No | Whether to send a notification when the widget is visible. | 35| relatedBundleName | string | Yes | No | Name of the associated bundle to which the widget belongs. | 36| scheduledUpdateTime | string | Yes | No | Time when the widget was updated. | 37| formConfigAbility | string | Yes | No | Configuration ability of the widget. | 38| updateDuration | number | Yes | No | Update period of the widget.| 39| defaultDimension | number | Yes | No | Default dimension of the widget. | 40| supportDimensions | Array<number> | Yes | No | Dimensions supported by the widget. | 41| customizeData | {[key: string]: [value: string]} | Yes | No | Custom data of the widget. | 42 43## FormType 44 45Enumerates the widget types. 46 47**System capability**: SystemCapability.Ability.Form 48 49| Name | Value | Description | 50| ----------- | ---- | ------------ | 51| JS | 1 | JS widget. | 52 53## ColorMode 54 55Enumerates the color modes supported by the widget. 56 57**System capability**: SystemCapability.Ability.Form 58 59| Name | Value | Description | 60| ----------- | ---- | ------------ | 61| MODE_AUTO | -1 | Auto mode. | 62| MODE_DARK | 0 | Dark mode. | 63| MODE_LIGHT | 1 | Light mode. | 64 65## FormStateInfo 66 67Describes the widget state information. 68 69**System capability**: SystemCapability.Ability.Form 70 71| Name | Type | Readable | Writable | Description | 72| ----------- | -------- |-------- | -------------------- | ------------------------------------------------------------ | 73| formState | [FormState](#formstate) | Yes | No | Widget state. | 74| want | [Want](js-apis-app-ability-want.md) | Yes | No | Want text. | 75 76## FormState 77 78Enumerates the widget states. 79 80**System capability**: SystemCapability.Ability.Form 81 82| Name | Value | Description | 83| ----------- | ---- | ------------ | 84| UNKNOWN | -1 | Unknown state. | 85| DEFAULT | 0 | Default state. | 86| READY | 1 | Ready state. | 87 88## FormParam 89 90Enumerates the widget parameters. 91 92**System capability**: SystemCapability.Ability.Form 93 94| Name | Value | Description | 95| ----------- | ---- | ------------ | 96| IDENTITY_KEY | 'ohos.extra.param.key.form_identity' | Widget ID.<br>**System API**: This is a system API. | 97| DIMENSION_KEY | 'ohos.extra.param.key.form_dimension' | Widget dimension. | 98| NAME_KEY | 'ohos.extra.param.key.form_name' | Widget name. | 99| MODULE_NAME_KEY | 'ohos.extra.param.key.module_name' | Name of the module to which the widget belongs. | 100| WIDTH_KEY | 'ohos.extra.param.key.form_width' | Widget width. | 101| HEIGHT_KEY | 'ohos.extra.param.key.form_height' | Widget height. | 102| TEMPORARY_KEY | 'ohos.extra.param.key.form_temporary' | Temporary widget. | 103