Loading value to toggle from database

I’m trying to set the value of the toggle button to be either on/off depending on the values it pulls from the database. The toggle is an active component. I have tried adding it within the template:

"<div class='buttons'>{common.statusButton(#active_campaign#)}</div>"

But no luck. How can I do this?

I haven’t found anything in the documentation that touches on this or any examples in the forum. I’m guessing this isn’t possible through Webix?

The value of the control can be provided by the same-name data attribute.
Please check the following snippet: http://webix.com/snippet/59663ed5

Using this module, please note that the acticeContent duplicates the same control’s object (including the ID/event handlers). Therefore, the value of the particular toggle can be obtained only through the related data item.
In short, a toggle acts like an ‘editor’ and adds the same-name data attribute (or affects the existing one) when you change its value. Data updates will affect the toggle as well.

Hi webix team, the snippet http://webix.com/snippet/59663ed5 works until version 6.4 but in version 7 ActiveContent is removed. Please modify the snippet working with version 7

@RainerRoss
you can achieve the same effect using custom template
https://snippet.webix.com/ck0q44td