在 Sharepoint 2007 中自定义调查字段

发布于 12-25 20:20 字数 387 浏览 1 评论 0原文

我有一个调查列表,其中有几个问题,其中一个是人员选择器字段,另一个是单行文本字段。

我需要根据登录用户隐藏特定问题(字段)。需求如下

  1. 当用户以admin身份登录时

    a.显示“人员选择器”,并且不应允许用户从人员选择器中选择自己的名字。

    b.隐藏单行文本字段。

  2. 当用户以“非管理员”身份登录时

    a.显示“单行文本”字段并默认为登录用户名(不带域名)。

    b.隐藏“人员选择器”控件。

我认为我们可以通过将 javascript 放置在内容编辑器 Web 部件中并将其添加到调查列表的 newform.apx 中来实现。有人能给我正确的方法来完成它吗?

提前致谢

I have a Survey list which has several questions, one of those is people picker field and the another one is single line of text field.

I need to hide a perticular question ( field ) based on login user. Requirement is as below

  1. When the user logs in as admin

    a. Display ‘people picker’ and should not allow user to pick his name from people picker.

    b. Hide Single line of Text field.

  2. When the user logs in as ‘Non-Admin’

    a. Display ‘Single line of Text' field and default it to have the logged in user name (without domain name).

    b. Hide ‘People picker’ control.

I am thinking that we can do it by placing javascript in content editor webpart and add it in newform.apx of survey list. Can anybody give me the proper approach to get it done?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

依 靠2025-01-01 20:20:00

您可能想尝试创建一个自定义字段控件,这是一种不同的控件每个领域。

Javascript 速度快且涉及最少的部署,但很繁琐并且可以关闭。

You might like to try creating a custom field control, a differnet one for each field.

Javascript is fast and involves minimal deployment, but is fiddly and can be turned off.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文