- Open the site in SharePoint Designer 2010
- Go to the Lists and Libraries, and select the Survey you want to edit from the content window:
- Click on the “NewForm.aspx” file in your main content window:
- Now add a Content Editor Web Part right below the standard ListFormWebPart, like so…
- Now, as for the content, it gets a bit tricky, you’ll want to go down to where the <;Content>; tag is for your Content Editor Web Part and add the following code between the brackets in the CDATA[]
<;script type="text/javascript">; var labels = document.getElementsByTagName("label"); for(var i = 0; i <; labels.length; i++) { if(labels[i].innerText == "Specify your own value:") labels[i].innerText = "Other:"; } <;/script>;It should look like the following on your screen:
- Ok, save the NewForm.aspx page and you’re done. Now when a user goes to take the survey, the ugly “Specify your own value:” is replaced with a nice friendly “Other:”
- Even better, because we used SharePoint web parts to achieve this, we only experience overhead on this specific page, we didn’t have to edit out of box code, and because we stayed within the normal confines of editing the NewForm.aspx it means our file doesn’t get UnGhosted! Winner!
sharepoint2010修改survey里面special your own value的方法
最新推荐文章于 2023-08-10 14:04:40 发布
本文介绍如何通过在SharePoint Designer 2010中编辑NewForm.aspx页面,使用Content Editor Web Part及JavaScript代码,来修改SharePoint调查表单中的默认文本显示,使其更加友好。



177

被折叠的 条评论
为什么被折叠?



