How do I set a checkbox / toggle by value?

Hi,

something like this doesn’t seem to work…:

<label class="toggle toggle-init" >
  <input type="checkbox" name="toggle" ${(isChecked)?'checked':''} /><i class="toggle-icon"></i>
</label>

What is the best way to do that?

<input type="checkbox" name="toggle" checked=${isChecked} />
1 Like

Oh man… sometimes I’m feeling really dump :wink: Thx!!