Last active
December 26, 2015 13:59
-
-
Save skipjac/7162556 to your computer and use it in GitHub Desktop.
hide ticket form option values in Zendesk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function(){ | |
(function(){ | |
$('option[value="641"]').wrap('<span class="hide-option"></span>'); | |
var isCust; | |
function isCustomer(element, index, array){ | |
return (element === 'paying'); | |
} | |
HelpCenter.user.organizations.forEach(function(x){ | |
isCust = x.tags.some(isCustomer); | |
return (isCust === true); | |
}); | |
if(isCust === true){ | |
$('option[value="641"]').unwrap('<span class="hide-option"></span>'); | |
} | |
}()); | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.hide-option{ | |
display: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is for HelpCenter version of Zendesk