Knowledge Article Popup message

User395771
Tera Contributor

On Knowledge Article Page when ever we click on Helpful Yes/No it should Popup a message box to provide the Feedback and Feedback needs to be captured on KB_feedback Table.

Need a client script for a Widget.

Helpful ? is set on Widget

find_real_file.png

Popup should be like below
find_real_file.png

 My Client script

function ($timeout,spModal) {
var c = this;
c.hide = false;
c.submitted = false;

c.action = function(state) {
c.submitted = true;
c.data.state = state;
c.data.response = c.data.submittingMsg;
c.server.update().then(c.hideIt);
}

c.hideIt = function() {
$timeout(function() {
c.hide = true;
}, 2000);
}


c.showPercentHelpful = function() {
if (c.submitted)
return false;

if (c.data.percent < 0)
return false;

return c.options.hide_percent_helpful != true && c.options.hide_percent_helpful != "true";

}

}

1 REPLY 1

Ct111
Giga Sage

Chk the below example

https://community.servicenow.com/community?id=community_question&sys_id=a0f54361db1cdbc01dcaf3231f96...

 

Mark my ANSWER as CORRECT and HELPFUL if it helps