Set multiple widget's Prop to the value of global variable

I want to disable the interaction prop for multiple widgets based on the value of a global variable.

I found out on other thread that I can make a prop reactive with this code:
VAR{interactive, true}

and through another widget set this custom variable with:
setVar('dpclick','interactive', false)

Is it possible to define a global variable that will update multiple widgets without having to manually adding them to a script?

Yes, it's easily possible.

Create a variable widget named (for example) setInteraction.

For each widget you'd like to control put @{setInteraction} as interaction property (instead of 1 or 0 directly).

Changing setInteraction's value will have effect on all those widgets at once.

setInteraction

2 Likes