# Display element based on condition; if input field is 'edited'

**URL:** <https://community.weweb.io/t/display-element-based-on-condition-if-input-field-is-edited/8226>\
**Category:** How do I?\
**Tags:** conditional-display\
**Created:** [April 20, 2024, 3:15pm UTC](https://community.weweb.io/t/display-element-based-on-condition-if-input-field-is-edited/8226 "2024-04-20T15:15:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt-thrive](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@matt-thrive](https://community.weweb.io/u/matt-thrive)\
**Post date:** [April 20, 2024, 3:15pm UTC](https://community.weweb.io/t/display-element-based-on-condition-if-input-field-is-edited/8226/1 "2024-04-20T15:15:31Z")

</div>

Hey experts!

I’m attempting to display this ‘Your information is not saved yet’ element IF any of these two input fields are modified from the current state - ‘modified’ as in typed/selected but not submitted to the database.

The intention is to warn the user that a change was made but not yet saved. In many cases the field will load with an initial value, the user will edit that value, but has not submitted the change…thus the goal here.

It seems possible but I’m clearly missing the right way to handle this type of condition.

 ![Screen Shot 2024-04-20 at 11.12.51 AM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/e/e411e0135ebd721d557bce027bf07c9dc70220c1.png)

---

<div class="post-metadata">

**Author:** ![luka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/luka/32/1571_2.png) [@luka](https://community.weweb.io/u/luka)\
**Post date:** [April 20, 2024, 3:42pm UTC](https://community.weweb.io/t/display-element-based-on-condition-if-input-field-is-edited/8226/2 "2024-04-20T15:42:51Z")

</div>

Make a conditional statement that compares the current input value(you can find them in the formula explorer) and the init value that you provide

---

<div class="post-metadata">

**Author:** ![matt-thrive](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@matt-thrive](https://community.weweb.io/u/matt-thrive)\
**Post date:** [April 20, 2024, 4:48pm UTC](https://community.weweb.io/t/display-element-based-on-condition-if-input-field-is-edited/8226/3 "2024-04-20T16:48:34Z")

</div>

Good suggestion. Now, to figure out how to write this properly.

Would it require reloading of the page or a variable? Or will the condition apply immediately without an confirmation (meaning, if anything is typed, the condition will apply)?

---

<div class="post-metadata">

**Author:** ![luka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/luka/32/1571_2.png) [@luka](https://community.weweb.io/u/luka)\
**Post date:** [April 20, 2024, 5:04pm UTC](https://community.weweb.io/t/display-element-based-on-condition-if-input-field-is-edited/8226/4 "2024-04-20T17:04:58Z")

</div>

It will display immediately

---

<div class="post-metadata">

**Author:** ![matt-thrive](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@matt-thrive](https://community.weweb.io/u/matt-thrive)\
**Post date:** [April 20, 2024, 5:06pm UTC](https://community.weweb.io/t/display-element-based-on-condition-if-input-field-is-edited/8226/5 "2024-04-20T17:06:21Z")

</div>

Thanks @luka - got it working! For anyone else attempting something similar, this format works:

`if([db value field]!=[input field], "Display", "")`

[db value field] = is the dynamic variable from Xano, for example

[input field] = is the exact field name in WeWeb.

Was much simpler than I was trying to write.

---

<div class="post-metadata">

**Author:** ![dhew](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dhew](https://community.weweb.io/u/dhew)\
**Post date:** [May 4, 2025, 1:35am UTC](https://community.weweb.io/t/display-element-based-on-condition-if-input-field-is-edited/8226/6 "2025-05-04T01:35:58Z")

</div>

Thanks–just needed this!
