How To create Sum Statment {xDrop + yDrop = text}

Hello developers

I want a code

Combine optional results between Two Dropdowns = Text

And the result is determined by .JS

export const $A$Cost$B$ = [
{value:“1$”, label: “1+1”},
{value:“1.5$”, label: “1+2”},
{value:“2$”, label: “1+3”},
{value:“2.5$”, label: “1+4”},
{value:“3$”, label: “1+5”},

Not sure what you exactly need, but …

DropDown1 → $w(‘#dd1)
DropDown2 → $w(’#dd2)

let myText = "My text " + $w('#dd1').value + " another text-section here " + $w('#dd2').value.
let myDropDownOptions = [   
    {value:"1$", label: "1+1"},
    {value:"1.5$", label: "1+2"},
    {value:"2$", label: "1+3"},
    {value:"2.5$", label: "1+4"},
    {value:"3$", label: "1+5"}
]

$w('#dd1').options = myDropDownOptions;
1 Like