How to Hide Attachment icon

chanikya
Kilo Sage

Hi,

if Knowledge Base is IT then only display attachment icon, other wise except IT icon should not visible to any other Knowledge base records...

 

1 ACCEPTED SOLUTION

ScienceSoft
Tera Guru

hi, There might be a better way to should write a client script based on onChange function. Below is an example in the form of a screenshot and a code:
find_real_file.png


function onChange(control, oldValue, newValue, isLoading, isTemplate) {

                var checkValue = g_form.getDisplayBox('kb_knowledge_base').value;

 

                if (checkValue == "IT"){

                                g_form.disableAttachments();

                } else {

                                g_form.enableAttachments();

                }

}

View solution in original post

11 REPLIES 11

Naveen4
Kilo Guru

Hi,

 

write a client script and check for the knowledge base it it ,if yes use the below

g_form.disableAttachments();

 

 

Regards,Naveen

can we able to hide attachment Icon????

yes,chanikya.

 

here is the script for the reference.

 

function onLoad() {
//Type appropriate comment here, and begin script below


var z =g_form.getDisplayBox('kb_knowledge_base').value;
//alert(z);

if(z=='IT') {
g_form.disableAttachments();
}


}

based on your query youcan use 

knowledgebase !=  condition.

if(z!='IT') {
g_form.disableAttachments();
}

Hope this helps.