# What is the formula that I can use to display an input if a form button is clicked?

**URL:** <https://community.weweb.io/t/what-is-the-formula-that-i-can-use-to-display-an-input-if-a-form-button-is-clicked/2029>\
**Category:** How do I?\
**Created:** [March 14, 2023, 4:04pm UTC](https://community.weweb.io/t/what-is-the-formula-that-i-can-use-to-display-an-input-if-a-form-button-is-clicked/2029 "2023-03-14T16:04:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nora](https://avatars.discourse-cdn.com/v4/letter/n/ed655f/32.png) [@nora](https://community.weweb.io/u/nora)\
**Post date:** [March 14, 2023, 4:04pm UTC](https://community.weweb.io/t/what-is-the-formula-that-i-can-use-to-display-an-input-if-a-form-button-is-clicked/2029/1 "2023-03-14T16:04:23Z")

</div>

I have a form with a button and a workflow on the button element.

I want to display an input once the button is clicked: Which formula can I use for it?

Thanks!

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [March 14, 2023, 5:05pm UTC](https://community.weweb.io/t/what-is-the-formula-that-i-can-use-to-display-an-input-if-a-form-button-is-clicked/2029/2 "2023-03-14T17:05:20Z")

</div>

There’s no need for a formula.

- create a variable of type boolean, default to `false`
- bind the conditional display to this variable
- in the button click workflow add an action to change the variable to `true`

You can find more details about conditional display [here](https://docs.weweb.io/css-and-styling/conditional-display.html)

---

<div class="post-metadata">

**Author:** ![nora](https://avatars.discourse-cdn.com/v4/letter/n/ed655f/32.png) [@nora](https://community.weweb.io/u/nora)\
**Post date:** [March 15, 2023, 2:04pm UTC](https://community.weweb.io/t/what-is-the-formula-that-i-can-use-to-display-an-input-if-a-form-button-is-clicked/2029/3 "2023-03-15T14:04:37Z")

</div>

Thanks!!
