Created
January 21, 2015 13:43
-
-
Save DeskWOW/53b9c9d8deafbbc39a41 to your computer and use it in GitHub Desktop.
Add labels to a case from support center contact form
This file contains hidden or 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
$(".input-block select, .input-block input, .input-block textarea").on("change keyup", function() { | |
$("ticket_labels_new").val(""); | |
var labels = []; | |
if ($("#div-inquiry-type select").val() == "Mobile App Support" && $("#div-platform select").val() == "Apple iPad" && $("#div-app select").val() == "Big Cat Week: Quest for Survival") { | |
labels.push("T- Channel"); | |
} | |
if ($("#div-inquiry-type select").val() == "Mobile App Support" && ($("#div-platform select").val() == "Apple iPad" || $("#div-platform select").val() == "Apple iPhone or iPod Touch" || $("#div-platform select").val() == "Android Phone (any)" || $("#div-platform select").val() == "Android Tablet (any)") && $("#div-app select").val() == "Nat Geo TV") { | |
labels.push("T- Channel"); | |
} | |
if ($("#div-category2 select").val() == "Request to combine two accounts" || $("#div-category2 select").val() == "Upload Photo Issues" || $("#div-category2 select").val() == "YourShot Assignments" || $("#div-category2 select").val() == "Other") { | |
labels.push("T- YourShot"); | |
} else if ($("#div-inquiry-type select").val() == "National Geographic Community Account" || $("#div-inquiry-type select").val() == "Your Shot Photo Community") { | |
labels.push("T- Membership"); | |
} | |
$("#ticket_labels_new").val(labels.join(",")); | |
console.log($("#ticket_labels_new").val()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment