Remove Save button in Take Survey Widget

madanm7786
Mega Guru

Hi All,

We are using OOB Take Survey Widget in our portal to display surveys.

We have Cancel, Save and Submit button in this widget. Now i need to remove the Save button from the widget.

So cloned the OOB widget and created a new one. But i do not find the html code for Save button.

Can you please help me.

Thanks,

Maddy

4 REPLIES 4

christophermart
Tera Contributor

Hi madanm7786,

 

You can find the code that creates the Save button within the spSurveyForm Angular Provider which should be added to your Take Survey widget. See related lists on the bottom of the Take Survey widget. The top section of this directive is creating the template where I believe around line 80, depending what version you have, you will see the code for the Save button.

 

Hope this helps!

Chris

This helps me find where it is coming from. However, what is the best practice? Is it to copy this directive and modify it, then change the code to not display the buttons, and readd it as a directive to the widget?

I would simply comment /* */ out the save button from the code.

 

brandont
Tera Expert

Ok, so weird thing, if you rename the survey page "public_survey_whatevername", you can use the out of the box take-survey widget and this disables the save button. For some reason in the spSurveyForm there is an "ng-if" statement that looks at what the page is called and if it is called "public_survey..." then it disables the save button. I found this way of disabling the save button without doing to much customization as all you need to do is clone the one survey page and everything else can stay the same. I am in the Paris release family. Thanks,