Hide Cancel and Save buttons on Service Portal customer survey

richard38
Tera Guru

Hello, I'm new to Service Portal development and I am looking to remove the Cancel and Save buttons from the survey. I've modified assessment_take2 to hide these and it works from the standard interface side. When the survey is opened from the Service Portal side the buttons remain.

 

thank you

1 ACCEPTED SOLUTION

Simon Rudd
Tera Contributor

Hi richcab,

I had the same issue and have a solution:

The name of the widget you need is called 'take survey'. Inside the widget, there is a related list called 'Angular Providers'. Within here, there is 'spSurveyForm' which is where you will find the buttons. (the save button is around line 70) You just need to comment out the line.

Let me know if this works for you.

 

View solution in original post

17 REPLIES 17

Simon Rudd
Tera Contributor

Hi richcab,

I had the same issue and have a solution:

The name of the widget you need is called 'take survey'. Inside the widget, there is a related list called 'Angular Providers'. Within here, there is 'spSurveyForm' which is where you will find the buttons. (the save button is around line 70) You just need to comment out the line.

Let me know if this works for you.

 

Perfectly working solution which is very hard to find.

Thanks so much for sharing!!! 🙂

I wanted to remove cancel button from the survey form ,

I commented out this line but yet still i can see the cancel button on survey form.

kalakaramad_20_0-1669378763378.png

this image is from widget is named as "Take Survey Deprecated  " in my widget list and in that under "spSurveyForm" I have updated.

 

but still can see the cancel button on the form.

 

Have you tried to modify the 'Survey's and Assessments' widget? It's not deprecated and appears to be what is used on the portal side.

A quick look: it appears that the 'button' tags are only there for the 'Submit' button.

 

Hiding cancel with CSS still works, though; and it's applicable at the page level.  Also, it may be possible to hide the cancel button using a JSON option (exam1 or exam2), but I haven't tried.

 

richard38_0-1669674675397.png