# Real-time Update of Equation Field based on Number Field

**URL:** https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724
**Category:** Ask Developers
**Created:** [August 19, 2024, 3:43pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724 "2024-08-19T15:43:10Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Quynh-Tram](https://avatars.discourse-cdn.com/v4/letter/q/e9c0ed/32.png) [@Quynh-Tram](https://forums.knack.com/u/Quynh-Tram)
#### Post date: [August 19, 2024, 3:43pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/1 "2024-08-19T15:43:10Z")

</div>

Hi! I have a number field (number of program hours) that informs an equation field (75% of program hours). i have both fields in a modal pop-up form page, and i want the equation field to update live in real-time when the values are entered or changed in the number field. is there a way to do this in knack?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Sunny\_Singla](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/sunny_singla/32/1007_2.png) [@Sunny\_Singla](https://forums.knack.com/u/Sunny_Singla)
#### Post date: [August 19, 2024, 4:22pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/2 "2024-08-19T16:22:22Z")

</div>

Hello Quynh,

It’s worked previously in knack but not now. Now to achieve this we use JavaScript. On change event we calculate value and fill into that field

Regards,  
Sunny Singla

---

<div class="post-metadata">

### Author: ![Quynh-Tram](https://avatars.discourse-cdn.com/v4/letter/q/e9c0ed/32.png) [@Quynh-Tram](https://forums.knack.com/u/Quynh-Tram)
#### Post date: [August 19, 2024, 4:46pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/3 "2024-08-19T16:46:10Z")

</div>

Oh bummer! I wonder why they removed this feature. It was such a great one.

---

<div class="post-metadata">

### Author: ![Sunny\_Singla](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/sunny_singla/32/1007_2.png) [@Sunny\_Singla](https://forums.knack.com/u/Sunny_Singla)
#### Post date: [August 19, 2024, 4:50pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/4 "2024-08-19T16:50:57Z")

</div>

Yes, But I have no Idea.

I’m not 100% sure… But now I use Javascript to achieve this feature.

Thanks

---

<div class="post-metadata">

### Author: ![Les](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/les/32/4243_2.png) [@Les](https://forums.knack.com/u/Les)
#### Post date: [August 19, 2024, 5:24pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/5 "2024-08-19T17:24:10Z")

</div>

Hi @Quynh-Tram,

That’s a good question! As long as the number field and any other fields used in the equation field are fields included in the form view, the equation field will update in real time when the end users of your live app enter data into the number fields and any other fields you may be using for the calculation. However, some limitations may prevent your equation field from updating.

See this article here for an example and current limitations: [Real-Time Equation Calculations in Forms](https://learn.knack.com/article/real-time-equation-calculations-in-forms)

---

<div class="post-metadata">

### Author: ![Dean2](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@Dean2](https://forums.knack.com/u/Dean2)
#### Post date: [August 20, 2024, 12:43am UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/6 "2024-08-20T00:43:27Z")

</div>

Hi

Based on what Les is saying could you not include the equation field in the form but then hide it using the KTL keyword \_hf?

Dean

---

<div class="post-metadata">

### Author: ![Quynh-Tram](https://avatars.discourse-cdn.com/v4/letter/q/e9c0ed/32.png) [@Quynh-Tram](https://forums.knack.com/u/Quynh-Tram)
#### Post date: [August 20, 2024, 6:51pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/7 "2024-08-20T18:51:44Z")

</div>

I was able to figure it out. Do not do “read-only” or “display value only” for the equation field. Much thanks.

---

<div class="post-metadata">

### Author: ![Les](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/les/32/4243_2.png) [@Les](https://forums.knack.com/u/Les)
#### Post date: [August 20, 2024, 7:18pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/8 "2024-08-20T19:18:16Z")

</div>

@Quynh-Tram Awesome, I’m glad you were able to get it figured out! 🎉

I was curious, so I went to test an edit form view where the equation field in the view had “Display the field value without a form input” checked. When I tested the edit form in the Live App, the equation field value was still updated in real-time.

![2024-08-20_12-12-36 (1)](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/b/b0363eaceca9825423687f725a12d6d9b98b2b89.gif)

I’m now wondering if I’m misunderstanding your setup. 🤔

---

<div class="post-metadata">

### Author: ![Sunny\_Singla](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/sunny_singla/32/1007_2.png) [@Sunny\_Singla](https://forums.knack.com/u/Sunny_Singla)
#### Post date: [September 8, 2024, 5:09pm UTC](https://forums.knack.com/t/real-time-update-of-equation-field-based-on-number-field/17724/9 "2024-09-08T17:09:39Z")

</div>

Yes, I see that it’s started working again. Or may be there is some issue where we place javascript
