Expand my Community achievements bar.

How do I do a calculation?

Avatar

Level 1

I am trying to do a simple calculation of two fields. I have never done this before and need some very basic help. What do I do?

1 Reply

Avatar

Level 5

Hi,

I think the best way for you is to use formcalc because this is easierer then javascript.

  1. you take a number field and name it for example "quantity"
  2. you take a number field and name it for example "price"
  3. you take a number field and name it for example "amount"
  4. then you go to the scripteditor (window | scripteditor)
  5. mark the field "amount" and go to the calculate-event (selected by show: calculate | language: formcal)
  6. write quantity * price
  7. you could use - + / *

I hope it will helps?

Mandy