Skip to content

Instantly share code, notes, and snippets.

@skipjac
Last active December 26, 2015 13:59
Show Gist options
  • Select an option

  • Save skipjac/7162556 to your computer and use it in GitHub Desktop.

Select an option

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

skipjac commented Dec 30, 2013

Copy link
Copy Markdown
Author

This is based on organization tags

@skipjac

skipjac commented Mar 18, 2014

Copy link
Copy Markdown
Author

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