Modal conditional/dynamic width

Hi :wave: , I saw this post about modals : Movable Modal Windows
and I'm trying to do something similar.
It would be nice to choose where the modal pop up: if one modal has a link to another one, they could show up side to side. (Right now the second opens on top of the first one.) I don't think it is possible right now so I tried to put the elements in the same modal and some of them are hidden elements.

I tried implementing a conditional width:

I circled in blue the switch that would be the condition, and it should change the width. I tried changing the Modal width with this : {{ switch1.value=true ? modal2.width="80%" : modal2.width="60%"}}
But it doesn't work: "Dependency Cycle Found: modal2.modalWidth -> modal2 -> modal2.modalWidth"

So I tried putting it in separate js query to define the width: it gives me no error but also does nothing.

Then,I tried to put a hidden Input on the modal with a default value at 60 and the modal width is defined with {{ numberInput4.value }}%. When I change manually the value of the numberInput4, the modal width changes but I can't seem to change its value.
the query: switch1.value=true ? numberInput4.value="80" : numberInput4.value="60";
and even when the query is just a " numberInput4.value="80" " with no default value, it doesn't change its value.
Would it also work to edit the width of a table? Right now, even hidden it takes half the modal. I tried to change it's width without success too :frowning_face: :

Any idea on how to change the width of a modal dynamically?

Hey @Meline,

Try this for your modal width value:

{{switch1.value ? "60" : "100"}}%