Hide/Remove SAVE button on customer survey in service portal
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 08:58 PM
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 06:16 AM
In case someone is running into this (somewhat older) question, I managed to remove the Save button on the portal survey like this:
- open the Surveys and Assessments widget.
- Clone it (since it is read only)
- In the Server script part, around line 94, there is some code that says
actions = decodeURIComponent(actions);
if (actions.length != 0) {
actionTypes = actions.split(',');
if (actionTypes.indexOf('cancel') != -1) data.assessment.hide_cancel = true;
if (actionTypes.indexOf('save') != -1) data.assessment.hide_save = true;
}
- Change this code to
actions = decodeURIComponent(actions);
if (actions.length != 0) {
actionTypes = actions.split(',');
if (actionTypes.indexOf('cancel') != -1) data.assessment.hide_cancel = true;
//if (actionTypes.indexOf('save') != -1) data.assessment.hide_save = true;
}
data.assessment.hide_save = true;
And then add this cloned widget to your survey portal page
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
If you are in control of the URL and don't need it to be bulletproof (i.e. the end user can change the URL manually), then you can do it by passing URL parameters like so to hide the save and cancel buttons:
?id=take_assessment&instance_id=xyz&hide_actions=save,cancel