I have four dropdown menus. I’d like to add up all four values and reuse the sum as a variable like this:
var sumDropdowns = awareness + consideration + conversion + kernbotschaft
Does it need to be a new JSObject or can I declare it where I would use it?
you can access the selected option of a select widget like so:
var sumDropdowns = awareness.selectedOptionValue + consideration.selectedOptionValue + conversion.selectedOptionValue + kernbotschaft.selectedOptionValue
I’m assuming here that your widgets are named as
This is how you would use it in a JS object.
If you’d like to use it in the canvas itself, suppose you have a text widget where you want to show the sum, you can use the moustache syntax.