Skip to content

Instantly share code, notes, and snippets.

@bmcbride
Created July 8, 2021 21:03
Show Gist options
  • Save bmcbride/3a29d762393524972d48aefa3dafd254 to your computer and use it in GitHub Desktop.
Save bmcbride/3a29d762393524972d48aefa3dafd254 to your computer and use it in GitHub Desktop.
Selectize Fulcrum editor visibility & requirement rule select controls
$('head').append('<script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.13.3/js/standalone/selectize.min.js"></script>');
$('head').append('<link href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.13.3/css/selectize.bootstrap3.min.css" type="text/css" rel="stylesheet" />');
$('.visibility-conditional-modal').on('shown.bs.modal', selectizeIt);
$('.required-conditional-modal').on('shown.bs.modal', selectizeIt);
function selectizeIt() {
$('.condition-field').selectize({
sortField: 'text',
dropdownParent:'body'
});
$('.selectize-dropdown').css('z-index', 9999);
$('.selectize-control').css('display', 'contents');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment