- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2020 06:18 AM
How to make "details" as mandatory when Helpful is selected as "NO" in knowledge article
Steps to reproduce.
1. Navigate to https://dev*****.service-now.com/kb
2. Open any of the article
3. Click on Helpful as "NO". Popup appear
4. How to make "Details" mandatory
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2020 09:55 AM
Hi Sandeep,
Thanks for providing the details. The feedback popup is coming from the ng-template "kb-feedback-task-modal" attached to the widget - "kb-article-content".
To make details mandatory - you need to modify the method - c.submitFeedbackTask in the widget - "kb-article-content". If you see the method - "submitFeedbackTask", there is already code to make the reason mandatory. Implement the same for details also.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2020 09:24 AM
Hi sandeep2729,
There are two ways to do this. One is to make the submit button disabled and only avialable if the comments is filled in.
And do you wan't it to be applicable for No Thanks button also or is it only for Submit button.
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2021 11:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2021 12:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2021 04:48 AM
Hello,
Could you please let me know if you were able to make the details mandatory if yes can you please provide the script used.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2022 12:10 AM
Hi ,
you can achieve this by updating the Client scripting of Knowledge Article Content widget.you need to create clone of this widget and use that in your kb_article_view page.
i had the requirement to make details mandatory if other is selected. you can modify the condition accordingly.
c.submitFeedbackTask = function() {
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();
}
}
Please, if this answer is relevant for you, please mark it as correct and helpful.
Thanks,
Shubham