# How to add an on-change event in camunda 8 form

**URL:** <https://forum.camunda.io/t/how-to-add-an-on-change-event-in-camunda-8-form/51779>\
**Category:** Discussion & Questions\
**Created:** [April 12, 2024, 7:21am UTC](https://forum.camunda.io/t/how-to-add-an-on-change-event-in-camunda-8-form/51779 "2024-04-12T07:21:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhi05675](https://forum.camunda.io/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@abhi05675](https://forum.camunda.io/u/abhi05675)\
**Post date:** [April 12, 2024, 7:21am UTC](https://forum.camunda.io/t/how-to-add-an-on-change-event-in-camunda-8-form/51779/1 "2024-04-12T07:21:22Z")

</div>

Hi ,

How can we add an on-change event on a field in camunda 8 form. I need to sum up few dynamic list ‘amount’ fields and show the value in ‘total value’ field . Please help , how can we achieve that.

Thanks

---

<div class="post-metadata">

**Author:** ![Niall](https://forum.camunda.io/user_avatar/forum.camunda.io/niall/32/15333_2.png) [@Niall](https://forum.camunda.io/u/Niall)\
**Post date:** [April 12, 2024, 7:33am UTC](https://forum.camunda.io/t/how-to-add-an-on-change-event-in-camunda-8-form/51779/2 "2024-04-12T07:33:41Z")

</div>

Thanks for the question @abhi05675

This can be done a few different ways - one of which is to add an express to the form that makes the calculation as you change variables. Then add that variable to a text view so see it change.  
 ![sumup](https://forum.camunda.io/uploads/default/original/3X/6/e/6ea53364b821bb1629e2e4973d54a37d8d91964f.gif)

I’ve built a quick example you can use:  
[Sumup.form](https://forum.camunda.io/uploads/short-url/9YO4xsZeabqAiUNa4IYM0J19ZoB.form) (1.7 KB)

---

<div class="post-metadata">

**Author:** ![Niall](https://forum.camunda.io/user_avatar/forum.camunda.io/niall/32/15333_2.png) [@Niall](https://forum.camunda.io/u/Niall)\
**Post date:** [April 12, 2024, 7:40am UTC](https://forum.camunda.io/t/how-to-add-an-on-change-event-in-camunda-8-form/51779/3 "2024-04-12T07:40:36Z")

</div>

Since you specifically asked about how to do it with a dynamic list. I build that into the example as well  
 ![sumup2](https://forum.camunda.io/uploads/default/original/3X/a/0/a022bba5161907709257c56713155f269f0d11f0.gif)  
[Sumup(1).form](https://forum.camunda.io/uploads/short-url/b7uENSWxtemBBLP2o6Iw6isdsvq.form) (2.8 KB)

---

<div class="post-metadata">

**Author:** ![abhi05675](https://forum.camunda.io/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@abhi05675](https://forum.camunda.io/u/abhi05675)\
**Post date:** [April 24, 2024, 8:20am UTC](https://forum.camunda.io/t/how-to-add-an-on-change-event-in-camunda-8-form/51779/4 "2024-04-24T08:20:28Z")

</div>

Thanks @Niall for your prompt response.  
Can you please help me in which property can I mention compute on expression.  
Also I am using dynamic list to show more than one key with its value . Need to save those values and show as read only in next user task . Please help in acheiving this as well.

Regards  
Abhishek

---

<div class="post-metadata">

**Author:** ![Niall](https://forum.camunda.io/user_avatar/forum.camunda.io/niall/32/15333_2.png) [@Niall](https://forum.camunda.io/u/Niall)\
**Post date:** [April 24, 2024, 8:28am UTC](https://forum.camunda.io/t/how-to-add-an-on-change-event-in-camunda-8-form/51779/5 "2024-04-24T08:28:53Z")

</div>

The example above already creates a variable containing the total, you can see it in the `Form Output` text box.
