How to show Survey as Modal Pop-up in Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 09:44 AM - edited ‎07-21-2023 12:39 PM
Hi,
We have catalog item link in Service portal so whenever user click the link it should show Survey as Modal Pop-up and where user need to fill the survey. So I have modified the widget client script like below its showing survey widget not actual form to fill in. Please help me on this. Thanks
HTML
<button ng-click="c.openSurveyModal()">Report a Problem</button>
Client script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 01:09 PM
Hi @reddy8055 ,
To enable a Survey Modal Pop-up when users click on the "Report a Problem" link in the Service Portal:
HTML Code:
<button ng-click="c.openSurveyModal()">Report a Problem</button>
Client script :
c.openSurveyModal = function() {
if (typeof spModal === 'undefined') {
return;
}
spModal.open({
title: 'Survey',
widget: 'surveys',
buttons: [
{ label: '', hide: true },
{ label: '', hide: true }
],
widgetInput: {
q: 'ff010f5b87443550549484c4dabb3507'
},
onClose: function(result) {
// Add any necessary actions to be performed after the survey is completed
}
});
};
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 01:16 PM
Hi,
I am not seeing the form in the Modal its showing blank.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 01:20 PM
Modify the model part , specifying the label:'ABC' and segt hide: false.
For more reference on how to set modal , please refer this tutorial video:
https://www.youtube.com/watch?v=ADmDpbX94Mk
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 01:32 PM - edited ‎07-21-2023 01:33 PM
I checked this one, I am able to create a Modal but survey form is not showing up instead it is showing as widget.
Please see below screenshot.
I am not able see this information instead it showing as above. If click on that widget it takes to this form