We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

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

Balakrishna_ABK
Kilo Sage

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

4 REPLIES 4

Tanushree Maiti
Tera Patron

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 Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Hi @Tanushree Maiti ,
Thanks for your reply, 

 

dd4.png
feedback is getting captured even if we cross the dialog box without filling details and reason.

Hi @Balakrishna_ABK 

Do you mean without clicking "Submit" , feedback is getting captured , when you cross the dialog box?

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Hi @Tanushree Maiti , yes without clicking Submit , feedback is getting captured , when we cross the dialog box