I’m building a custom module and I’ve found a difference between EE v5 and EE v6 regarding the toggle field in the control panel, below are fields fields that work in each version, unfortunately I can’t find an approach that works in both.
My question is; how should I deal with this so that users can install my module on either version seemlessly?
EE5 toggle:
<div class="field-control">
<a href="#" class="toggle-btn off">_ <input type="hidden" name="mode" value="1">_ <span class="slider"></span>_ <span class="option"></span>_ </a>
</div>
EE6 toggle:
<div class="field-control">
<button type="button" class="toggle-btn yes_no off" data-toggle-for="auto_custom_field" data-state="off" role="switch" aria-checked="true" alt="on">
<input type="hidden" name="auto_custom_field" value="1">
<span class="slider"></span>
</button>
</div>
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.