Skip to content

Instantly share code, notes, and snippets.

@lbroshi
lbroshi / zendesk-forms-by-org.js
Created February 17, 2020 14:05
Zendesk Filter Forms by Organization
// This will allow you to restrict forms by naming them with:
// Form-name-here [ONLY: Organization-name]
$(window).load(function() {
const formRegex = /\[ONLY: (\w+)]/;
function sanitizeForm(formName, orgs) {
result = {
formName: formName.replace(formRegex, ''),
allowed: false
}