0
votes

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

3
There are a great deal of SharePoint designing related questions. This one is valid. The solution may in fact require a programmed custom field to solve. NPR is probably premature if at all relevant.Danny

3 Answers

1
votes

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.

0
votes

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..

0
votes

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)