# Change text based on parent state

**URL:** https://community.weweb.io/t/change-text-based-on-parent-state/6646
**Category:** How do I?
**Tags:** binding
**Created:** [January 28, 2024, 9:07am UTC](https://community.weweb.io/t/change-text-based-on-parent-state/6646 "2024-01-28T09:07:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![unlustucru](https://avatars.discourse-cdn.com/v4/letter/u/e36b37/32.png) [@unlustucru](https://community.weweb.io/u/unlustucru)
#### Post date: [January 28, 2024, 9:07am UTC](https://community.weweb.io/t/change-text-based-on-parent-state/6646/1 "2024-01-28T09:07:04Z")

</div>

I have a modal that has a default title: “Sign in to your account”.

I want to add a “signUp” state to the modal, and then use that state to change the title’s text value to “Create your account”.

How do I do this?

---

<div class="post-metadata">

### Author: ![Vi56](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/vi56/32/11392_2.png) [@Vi56](https://community.weweb.io/u/Vi56)
#### Post date: [January 31, 2024, 7:42am UTC](https://community.weweb.io/t/change-text-based-on-parent-state/6646/2 "2024-01-31T07:42:27Z")

</div>

Hi @unlustucru,  
To do so you can simply create a boolean variable `signUpModalState` with false default value,for exemple. On click on a button the workflow associated can change the variable. In your title text field you can bind the following formula :  
`if(signUpModalState = true, “Create your account”, “Sign in to your account”)`
