Recent searches


No recent searches

Conor Makowski's Avatar

Conor Makowski

Joined May 13, 2021

·

Last activity Oct 24, 2021

Following

0

Followers

0

Total activity

2

Votes

0

Subscription

1

ACTIVITY OVERVIEW

Latest activity by Conor Makowski

Conor Makowski commented,

CommentUsers, groups, and organizations

I've been testing Ryan Mayes's solution for this issue (see code block below), but hit a snag that I haven't seen addressed here. Here's what Ryan shared:

$(window).load(function() {
    var i = 0;
    var checkExist = setInterval(function() {
        i++;
        if ($("a.nesty-input").length){
            clearInterval(checkExist);
            $("a.nesty-input").each(function() {
                $(this).bind( "click", function() {
                    //Create dictionary of available forms
                    var forms = {}
                    var options = document.getElementById("request_issue_type_select").getElementsByTagName("option");
                    for (i = 1; i < options.length; i++) {
                        forms[options[i].text] = options[i].value;
                    };
                    //Iterate through each form 
                    Object.keys(forms).forEach(function(item){
                        formTag = item.split(" - ")[0].toLowerCase();
                        //Remove forms that do not meet user criteria
                        if (!(~HelpCenter.user.tags.indexOf(formTag))){
                            $(("#"+forms[item])).remove();
//Add this to hide form "tags" from user view
}else{
$(("#"+forms[item])).text(item.split(" - ")[1]);
} }); }); }); } if (i > 10){ clearInterval(checkExist); } }, 100); });

Now here's my problem: when looking at the dropdown when this code is present, everything looks fine. For example, a form titled "test_tag - Ticket Form 1" will appear as "Ticket Form 1". This is exactly what I want to see in the dropdown.

Unfortunately, once I click on "Ticket Form 1" and the actual form loads, the selection in the dropdown field shows the form's name as "test_tag - Ticket Form 1". Clicking on the dropdown again shows the available forms as desired (no tags visible), but whenever one is selected it appears with the tag. 

Here are the ticket forms as they appear in the dropdown:

And here's what it looks like when I select one:

Any ideas on how to resolve this issue? We're using some really long and ugly tags on our side and I can't have them showing up in the form name. 

View comment · Posted Jan 30, 2021 · Conor Makowski

0

Followers

0

Votes

0

Comments