I'm trying to create an input field that sets the value to "EUR" if the "currency_transaction" field is equal to "€". Additionally, I want this input field to perform a calculation by default. The calculation is simple: it should multiply the price (without currency) by the quantity. The two values, price and quantity, are manually entered into two input fields.
I apologize for my lack of programming knowledge, and I would greatly appreciate any help with the JavaScript code. Thank you in advance!
Hey Enrico! So you have a total of 3 inputs, correct? And one final Total value?
Would something like this work for you? How is your currency_transaction field being populated? In my example, I set it to a dropdown (Select component), but it doesn't have to be!
![](https://downloads.intercomcdn.com/i/o/729315043/2ab13de11bdd67f1aa8c60e1/image.png)
See attached app JSON if you want to poke around with my setup! You can import this JSON file by clicking Create new (home page) > From JSON. Quick docs on exporting/importing apps here.
![](https://downloads.intercomcdn.com/i/o/535217284/d96fc6faa362eeb452308517/Screen+Shot+2022-06-23+at+9.38.18+AM.png)
Total-20calculator.json
Hi Victoria,
Very easy. Sorry to bother you for such stupid task.
Thank you very much.
E.
Enrico, no apologies needed whatsoever and definitely not a stupid task! Just glad I could help
Write back in anytime!