views:

8

answers:

1

I have created a custom list. I am using the same list in sharepoint designer through a page.

I a have a datetime field in the form. I want to make a default current date and time and let it make readonly.

How can I do the same.

thanks

+1  A: 

As I understood you, you want to set custom permissions on a date field (column) in a custom list. Sharepoint 2007 does not allow column-level security via the UI as far as I know.

If you deployed the list definition via Feature you can set the site columns to be read-only by setting the field to read only via its column definitions like so:

Hidden="FALSE" ReadOnly="TRUE" Required="FALSE" PITarget="" PrimaryPITarget="" PIAttribute="" PrimaryPIAttribute="" Node=""

An easier solution is to use third party tools such as the Sharepoint Tool Basket. It has a feature called "List Manager" which allows you to set columns to read-only if it's not a system column - see the codeplex site for screenshots.

As for your datetime field having the date of Today, you can just create a new Site Column of type Date/Time and set its default value to be "Today".

So the easiest solution would be: Install the List Manager and activate the feature for your site. Create a new site column "Today" of type Date/Time with default value set to Today. Afterwards set the site column to read-only via the List Manager.

moontear

related questions