Calculate Total


I have a text called “Price” (ID: text88) that is connected to my database to a text field with numbers in it. I also have an Input Field (ID: input1) that is set to number, with a max number of 4. I then have a text called “Total” (ID: text 103) that I want it to show the total of multiplying the input field number by the price from the database.

Any Idea how I can do that?


$w.onReady(() => {
    $w("#dataset1").onReady(() => {
        const price = Number($w("#text88").text);
        $w("#input1").onChange(event => {
            let inputValue = Number($w("#input1").value);
            let total = price * inputValue;
            $w("#text103").text = total.toLocaleString();

Like a Charm :slight_smile:

Thank you