# Field

### Introduction

Provided below are the attribute values pertaining to widgets.

🔒 Fields with this icon are read-only fields that cannot be revised.

<table><thead><tr><th width="157">Name</th><th>Description</th></tr></thead><tbody><tr><td>🔒 id</td><td>Calls the widget id value</td></tr></tbody></table>

## 📚 API Explanation and Example

### id

{% hint style="info" %}
widget.id
{% endhint %}

This calls the widget’s id value.

**Example**

Display the widget id value.

{% file src="<https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FOui95bHutE4tcXmqdhNN%2Fsample.zip?alt=media&token=a422bc77-2584-49c0-adfb-3f0805d26745>" %}

<div align="left"><figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2F0pJOUI5cRXVSUXes7AO4%2FUntitled.png?alt=media&#x26;token=b568e995-110a-4464-92d0-65e1323ba111" alt=""><figcaption></figcaption></figure></div>

```jsx
let _widget = null;
// Activates function when q is pressed 
// App.addOnKeyDown Description
App.addOnKeyDown(81, function (player) {
	_widget = player.showWidget("sample.html","top",300,300);
	App.sayToAll(`widget id: ${_widget.id}`)
});
```
