Open karmendra opened 4 years ago
You can use this toggleswitch script with () or without () bootstrap-switch plugin:
.editable('show') is to make sure that the control is always shown If bootstrap_switch: true make sure you include bootstrap-switch library (tested with v3.3.4)
.editable('show')
bootstrap_switch: true
html:
<span>Verified:</span> <span id="verified" data-type="toggleswitch" data-value="{'true'}"> </span>
script:
$('#verified').editable({ mode: 'inline', showbuttons: false, onblur: 'ignore', pk: 2, url: '/post.php', title: 'Verified', // toggleswitch specific options onchange: 'submit', bootstrap_switch: true, bootstrap_switch_options: { onText: 'YES', offText: 'NO', onColor: 'success', offColor: 'danger', size:'mini', inverse: true }, }).editable('show');
and my suggestion for the field in the database is tinyint (1)
You can use this toggleswitch script with (
) or without (
) bootstrap-switch plugin:
.editable('show')
is to make sure that the control is always shown Ifbootstrap_switch: true
make sure you include bootstrap-switch library (tested with v3.3.4)html:
script: