Skip to content

Instantly share code, notes, and snippets.

@skipjac
Created April 3, 2015 15:46
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skipjac/8783de387d23bf171645 to your computer and use it in GitHub Desktop.
Save skipjac/8783de387d23bf171645 to your computer and use it in GitHub Desktop.
Remove Ticket Form option from dropdown in Zendesk
//remove the options from the select
$('#request_issue_type_select option[value="43517"]').remove();
//remove the option from the nesty-input after it's been created.
$('div').one('DOMNodeInserted', function(e){
$('.nesty-panel').one('DOMNodeInserted', function(e){
$(this).children('ul').children().remove('#43517');
});
});
@skipjac
Copy link
Author

skipjac commented Aug 23, 2016

for nested fields first get all the nest panels

var skip1 = document.querySelectorAll('.nesty-panel')

Then watch for every time the panel is inserted to the DOM and remove the options by tag you don't need

$(skip1).on('DOMNodeInserted', function(e){$(this).children('ul').children().remove('#nest__two_2');})

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