# Any way to set focus on a button?

**URL:** <https://forum.bubble.io/t/any-way-to-set-focus-on-a-button/32446>\
**Category:** Need help\
**Created:** [June 30, 2018, 6:24am UTC](https://forum.bubble.io/t/any-way-to-set-focus-on-a-button/32446 "2018-06-30T06:24:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aphz88](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@aphz88](https://forum.bubble.io/u/aphz88)\
**Post date:** [June 30, 2018, 6:24am UTC](https://forum.bubble.io/t/any-way-to-set-focus-on-a-button/32446/1 "2018-06-30T06:24:02Z")

</div>

Would there be any way to set focus on a button?

I have a “post” button that I want to be focused when the input is being filled.

---

<div class="post-metadata">

**Author:** ![patricia](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/patricia/32/57583_2.png) [@patricia](https://forum.bubble.io/u/patricia)\
**Post date:** [June 30, 2018, 9:21am UTC](https://forum.bubble.io/t/any-way-to-set-focus-on-a-button/32446/2 "2018-06-30T09:21:04Z")

</div>

As far as I know, and I’m no expert, it is not possible because being focused would mean it is being pressed. But, what you can do is to use conditionals to change the appearance of the button. So set the button ‘This input isn’t clickable’ and use faded out color scheme. Then set  
a condition on the Conditionals tab of the button When XXX Input is focused, This button is clickable and Backround Color = some bright color. Hope that helps.

---

<div class="post-metadata">

**Author:** ![jarrad](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jarrad](https://forum.bubble.io/u/jarrad)\
**Post date:** [June 30, 2018, 5:00pm UTC](https://forum.bubble.io/t/any-way-to-set-focus-on-a-button/32446/3 "2018-06-30T17:00:27Z")

</div>

You can focus a button without it clicking if your use case need’s it - First give the button an ID, then grab the [PlugBubble Plugin](https://bubble.io/plugin/plug-bubble-1504718469081x805486046716624900) & use the custom code block with this code,

```auto
document.getElementById('BUTTONS-ID').focus();
```

replacing the `BUTTONS-ID` with your actual button’s id, you should end up with something like this,

![image](https://us1.discourse-cdn.com/bubble/original/3X/2/b/2b3919eb55be1e68acad354cc5be3073957f10bb.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [September 8, 2018, 6:24am UTC](https://forum.bubble.io/t/any-way-to-set-focus-on-a-button/32446/4 "2018-09-08T06:24:04Z")

</div>

Closed on September 8, 2018, 6:24am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
