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

Hide/Remove SAVE button on customer survey in service portal

Abdulrajak Shai
Tera Contributor

Hi All,

How to hide/remove the SAVE button on survey form(customer survey) in service portal.

I have modified assessment_take2 to hide SAVE button on platform and it works fine. How to hide the same in service portal? Can any one please help.

find_real_file.png

 

Thank you.

6 REPLIES 6

qdfg
Tera Contributor

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

rudipohjaniemi
Tera Contributor

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