# Easy Guide to Referencing Bubble Elements Within Bubble Plugin

There are instances when you may need to access an element created within the Bubble editor. For example, in a plugin, you might want to return the number of characters a user types into an input element.

Follow these steps:

**Step 1:**

Enable the "Expose the option to add an ID to HTML elements" by navigating to Settings &gt; General, and scrolling to the bottom of the page.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697023937828/8d725d12-e84c-4d05-91bd-9b0e5e222216.png align="center")

**Step 2:**

Locate the element for which you want to assign a custom ID, and enter the desired ID in the "ID Attribute" field.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697024665091/46e33055-bfb6-4457-9ae1-d7dd28e24e4a.png align="center")

**Step 3:**

Create the plugin using "text" as the input and pass this ID to the plugin's input.

**Step 4:**

```javascript
var element = document.getElementById(properties.html_id);
  console.log(element);
```

That's it..

---

That's all for this blog. Subscribe for more future updates. Thank you!

Follow me on [Twitter](https://twitter.com/NocodeTalks).

**Checkout My Bubble Plugin Course** - Use coupon code "THEBUBBLEGROUP" at checkout for 10% discount.

%[https://nocodetalks.co/bubbleplugin]
