Sharepoint 2007 - Survey removing save button
You will notice save botton in sharepoint surveys when using sharepoint surveys with branching options. It confuse most of surveys users as generally user select save instead of next or finish which result in in complete surveys.
We have checked a lot in sharepoint options and failed to find any option thay may allow admisitrator or pulisher to disable this buton and find that there is one work around using sharepoint designer for removing it.
1. Open site in sharepoint designer
2. Go to you subsite and expand pages under survey (created earlier with branching option)
3. Open newform.aspx and find following
<asp:content contentplaceholderid="PlaceHolderMain" runat="server">
4. Add following javascript before closing tag of the content place holder searched in last step
<script> var x=document.getElementsByTagName("input"); for (var
i=0;i<x.length;i++) { if (x.item(i).type=="button"&&x.item(i).value=="Save")
{x.item(i).style.display = "none"};} </script>
5. Above script will search for save button and toggle its visibility. If you need to remove save button while editing existing responses you will have to repeat above steps for editform.aspx.
We have checked a lot in sharepoint options and failed to find any option thay may allow admisitrator or pulisher to disable this buton and find that there is one work around using sharepoint designer for removing it.
1. Open site in sharepoint designer
2. Go to you subsite and expand pages under survey (created earlier with branching option)
3. Open newform.aspx and find following
<asp:content contentplaceholderid="PlaceHolderMain" runat="server">
4. Add following javascript before closing tag of the content place holder searched in last step
<script> var x=document.getElementsByTagName("input"); for (var
i=0;i<x.length;i++) { if (x.item(i).type=="button"&&x.item(i).value=="Save")
{x.item(i).style.display = "none"};} </script>
5. Above script will search for save button and toggle its visibility. If you need to remove save button while editing existing responses you will have to repeat above steps for editform.aspx.
I don't see the javascript
ReplyDeleteFixed, I hope you can see now. Thanks for pointing out this issue.
ReplyDeleteExcellent piece of code. Was the only thing that I found that worked from a Google search. Thanks!
ReplyDeleteWhere exactly in the below code should the code you supplied go? I get error messages when I try to paste the code in.
ReplyDeleteNewform.aspx of your survy as mentioned above
ReplyDeleteGenius! How come such an obvious issue has not been addressed by the MS SharePoint Team!?! Thank goodness you are on the ball! :-) After 70% of our surveys not being completed as users thought they should click 'save', this has solved a massive problem for me!
ReplyDeleteSounds great. What should we be finding in step #3?
ReplyDeleteThanks!
Thanks Hassan and Carron for specifying issue in step 3 . It was due to my mistake while writing blog :). I have updated blog hope it will be helpful for you
ReplyDeleteThank you Mr. Hussain for your post. I edited newform.aspx and the Save button was removed from the first question on my survey. Unfortunately, the Save button is still visible on subsequent questions/pages. I have a branch built in for each question so one question appears per "page". Any help is greatly appreciated. Regards. Steve
ReplyDelete