We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Custom Module toggle fields v5 fields do not work on v6 site

How Do I?

icicic's avatar
icicic
8 posts
4 years ago
icicic's avatar icicic

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>
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.