How to make details mandatory in feedback rating of knowledge article?

Balakrishna_ABK
Tera Guru

dd2.png
I want to make details to be filled mandatory when the article rating is 1,2 or 3 in the portal 

1 REPLY 1

Tanushree Maiti
Mega Sage

Hi @Balakrishna_ABK 

 

Use following code as given in following post.

 

To make details mandatory – you need to modify the method – c.submitFeedbackTask in the widget – "kb-article-content".
line 461 in client controller.
c.submitFeedbackTask = function(){
// c.data.details if details is empty and c.data.reason=="4"  user selected reason as other
if(c.data.reason=="4" && c.data.details==""){
c.flagMessage = "${Please provide the mandatory details}";
$("#detailsComment").focus();
return false;
}
else{
c.submitted = true;
c.closePopup();
}
}

 

Ref: How to make "details" as mandatory when Helpful is selected as "NO" and user select other option in ...

 

Solved: Make 'details' on SP Knowledge Feedback mandatory - ServiceNow Community

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: