Sharepoint 2007:如何禁用文本框

发布于 2024-08-05 21:40:22 字数 325 浏览 8 评论 0原文

我是 sharepoint 2007 的新手。我有以下要求。

1)我想为员工创建一个自定义列表,他们可以在其中选择项目并填写表格并提交。

示例:列表 -->硬盘 -->点击-->创建新列表 -->

列表具有以下字段 1) EmpID 2) 客户名称(文本),3) 订单日期,4) 数量 5) 价格

一旦用户提交列表,我想禁用 EMPID 字段并允许同一用户编辑其他字段,如果必需的。

如何禁用 Sharepoint 2007 中的文本字段 (Empid)?我将不胜感激任何其他替代或更好的想法。

谢谢, 问候 维克

I am new to sharepoint 2007. I have a following requirement.

1) I would to create a custom list for employee where they can select the item and fill-out the form and submit.

Example : List --> Hard Disk --> Click --> Create new list -->

List has following fields 1) EmpID 2) Customer name (Text) , 3) Order Date, 4) Qty 5) Price

Once user submit the list then I would like to disable the EMPID field and allow same user to edit the other fields if required.

How can I disable the text field (Empid) in the Sharepoint 2007 ? I would appreciate any other alternate or better idea.

Thanks,
Regards
Vick

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

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

发布评论

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

评论(3

丑丑阿 2024-08-12 21:40:22

我会使用 jQuery 来达到这个目的。以下是描述如何隐藏文本字段的示例在 SharePoint 表单上。将 .hide() 更改为 .attr('disabled','disabled') 这将禁用文本字段。

如果您需要部署 jQuery 方面的帮助,查看此问题

I would use jQuery for this purpose. Here is an example that describes how to hide a text field on a SharePoint form. Change the .hide() to .attr('disabled','disabled') and this will disable the text field.

If you need help with deploying jQuery, see this question.

豆芽 2024-08-12 21:40:22

我不确定这是否是一个更好的主意,但我曾经在这种常见情况下这样做过
首先

识别 html 源代码中的文本框 ID(通过网络浏览器查看源代码),之后我编写了 javascript 函数来禁用文本框,即 EMPID,或者我们可以通过样式表并使用 javascript 应用样式。

I am not sure its a better idea or not, but for that i used to do for this common scenario
that

fist identify the textbox id in html source (through web browser view source) after that i wrote javascript function to disable textboxes i.e. EMPID or we can do through style sheet and apply style using javascript..

我们的影子 2024-08-12 21:40:22

您可以为同一列表创建多种内容类型。让用户填写包含 EmpID 字段的内容类型(在 LeftNav 中放置一个链接,将用户发送到具有正确 ContentTypeId 的 NewItem.aspx)。将默认内容类型设置为不带 EmpID 的内容类型,这样当他们返回并编辑时,他们将看不到该 EmpID 字段。

这样做的缺点是他们会在“新建”按钮下拉列表中看到两种内容类型。您可以以有意义的方式命名它们(新硬盘顺序、编辑硬盘顺序)

You can create multiple content types for the same list. Have the user fill out the content type that contains the EmpID field (put a link in the LeftNav that sends them to NewItem.aspx with the proper ContentTypeId). Make the default content type the one without the EmpID, so when they go back in and edit they won't see that EmpID field.

The downside to this is that they'll see both content types in the New button dropdown. You can name them in a way that makes sense (New Hard Disk Order, Edit Hard Disk Order)

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