was this helpful ? yes/no, if it is No then comments is mandatory. How would we achieve this?

Shiva prasad t
Tera Guru

In knowledge management, On below of the article in service portal, When we click on the feed back of , Helpful? NO, before submitting the feedback  the comments should be mandatory.

How would i achieve this?

 

1 ACCEPTED SOLUTION

Hi  you need to clone  Knowledge Article Content widget and in client controller you can make this as mandatory. Look for the below function

    c.submitFeedbackTask = function(){
        if(!c.data.reason){
            c.flagMessage = "${Please provide the mandatory details}";
            $("#detailsComment").focus();
            return false;
        }

// add the below bold statement
        if(!c.data.details){
            c.flagMessage = "${Please provide the mandatory details}";
            $("#detailsComment").focus();
            return false;
        }
        else{
            c.submitted = true;
            c.closePopup();
        }
    }

Refer attached attachment

Regards
Harish

View solution in original post

4 REPLIES 4

Community Alums
Not applicable

Hi Shiva Prasad

This is available OOB with knowledge feedback functionality.

Check below for more details

https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/product/knowledge-management/re...

https://hi.service-now.com/kb_view.do?sysparm_article=KB0712422

 

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

Hello @Sandeep Dutta find_real_file.png

In this popup , before submitting the form we need to enter details, that means the details should be mandatory before submitting. How it is possible?

 

Hi I dont think this is possible to make details mandatory. The KB feed back task pop up is a angular template associated with widget

You can go to this table "sp_ng_template"  and look for kb-feedback-task-modal template this is what the pop up brings up. You can try here to make it mandatory

Regards
Harish

Hi  you need to clone  Knowledge Article Content widget and in client controller you can make this as mandatory. Look for the below function

    c.submitFeedbackTask = function(){
        if(!c.data.reason){
            c.flagMessage = "${Please provide the mandatory details}";
            $("#detailsComment").focus();
            return false;
        }

// add the below bold statement
        if(!c.data.details){
            c.flagMessage = "${Please provide the mandatory details}";
            $("#detailsComment").focus();
            return false;
        }
        else{
            c.submitted = true;
            c.closePopup();
        }
    }

Refer attached attachment

Regards
Harish