Values for switch input

sajansb pro asked 6 years ago

how to define values for swith input in Off and On state

Bartłomiej Malanowski staff pro premium answered 6 years ago

In fact, our switch component is just a styled checkbox, so you can do something like this:

<div class="switch">
    <label>
        Off
        <input type="checkbox" checked="checked" value="The Value">
        <span class="lever"></span>
        On
    </label>
</div>

Now you should be able to read the value from the switch


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No