# RADSYSTEMS 7.1.2 multiply issue

**URL:** <https://forum.radsystems.io/t/radsystems-7-1-2-multiply-issue/1083>\
**Category:** Questions\
**Created:** [September 17, 2022, 4:16pm UTC](https://forum.radsystems.io/t/radsystems-7-1-2-multiply-issue/1083 "2022-09-17T16:16:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony\_j](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/b2d939/32.png) [@tony\_j](https://forum.radsystems.io/u/tony_j)\
**Post date:** [September 17, 2022, 4:16pm UTC](https://forum.radsystems.io/t/radsystems-7-1-2-multiply-issue/1083/1 "2022-09-17T16:16:02Z")

</div>

Hi Everyone  
does any know how to multiply two fields and place the result in a third field of the same table. I want to multiply my quantity field by my price field and place the result in a field called total price. I’m new to laravel and could really do with some help ,thanks

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [September 18, 2022, 1:31am UTC](https://forum.radsystems.io/t/radsystems-7-1-2-multiply-issue/1083/2 "2022-09-18T01:31:04Z")

</div>

You can use the **Client Events** for the Classic project. When you open the Client Events located on the Add page Field Properties, then add the below code and modify it, changing **ctrl-first\_field** , **ctrl-second\_field** , and **ctrl-total\_field** with yours appropriately.

```auto
$('#ctrl-first_field, #ctrl-second_field').on('change', function(){
    $("#ctrl-total_field").val(parseFloat($("#ctrl-first_field").val()) * parseFloat($("#ctrl-second_field").val()));
});

```

---

<div class="post-metadata">

**Author:** ![tony\_j](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/b2d939/32.png) [@tony\_j](https://forum.radsystems.io/u/tony_j)\
**Post date:** [September 21, 2022, 3:16pm UTC](https://forum.radsystems.io/t/radsystems-7-1-2-multiply-issue/1083/3 "2022-09-21T15:16:33Z")

</div>

Thankyou so much for the code it works well when I call the add page direct. However when the add page is embedded in a view page via Page Design it doesnt work. It also doesn’t work if I change to a dynamic table. any feedback would be really welcome and appreciated , thankyou.

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [September 23, 2022, 1:41pm UTC](https://forum.radsystems.io/t/radsystems-7-1-2-multiply-issue/1083/4 "2022-09-23T13:41:15Z")

</div>

To work with modals or if your function is not triggered with the above code, you will need to bind the event listener to the root node or document and it should work. Check below for an example. If you want to do calculations on table row it is somewhat difficult, it is advisable to stick to the regular form when you plan on doing calculations, then use dynamic forms when you have no plans for that.

```auto
$(document).on('change', '#ctrl-first_field, #ctrl-second_field', function(e) {
    $("#ctrl-total_field").val(parseFloat($("#ctrl-first_field").val()) * parseFloat($("#ctrl-second_field").val()));
});

```

the codes written here are [jQuery](https://api.jquery.com/) codes, so if you find a [jQuery](https://api.jquery.com/) code that you want to implement in your project it should work with a few changes.

---

<div class="post-metadata">

**Author:** ![ddiaz](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@ddiaz](https://forum.radsystems.io/u/ddiaz)\
**Post date:** [October 14, 2022, 5:50pm UTC](https://forum.radsystems.io/t/radsystems-7-1-2-multiply-issue/1083/5 "2022-10-14T17:50:37Z")

</div>

You could also make a custom field that does the calculation, so if it doesn’t refresh as you add the values, you’ll have to do it through code.

 ![total](https://forum.radsystems.io/uploads/default/original/1X/5d54f9511c89bf225bba90cbdacd0a5f2544eed2.jpeg)
