Skip to content

Instantly share code, notes, and snippets.

@skipjac
Last active December 26, 2015 13:59
Show Gist options
  • Save skipjac/7162556 to your computer and use it in GitHub Desktop.
Save skipjac/7162556 to your computer and use it in GitHub Desktop.
hide ticket form option values in Zendesk
<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>
.hide-option{
display: none;
}
@skipjac
Copy link
Author

skipjac commented Dec 30, 2013

This is based on organization tags

@skipjac
Copy link
Author

skipjac commented Mar 18, 2014

This is for HelpCenter version of Zendesk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment