views:

224

answers:

3

Hi,

I have created a Custom Edit Form for a custom list using SharePoint designer. I need to check that the current user is the author of the list item before displaying the form as only the author should be able to edit this content. I don't have server access so want to do this in the form itself using XSL. So far, I haven't been able to retrieve the Author / Created By value. Does anyone know how to get at this value?

Thanks for your help

Iain

Update:

I can see now that the Edit Form is using a datasource which basically returns a view containing all fields in the content type. "Author" is not part of the content type (which is a custom one). I can't see any way of adding the Author to the content type. Does anyone know how this can be achieved as i think this would solve the problem. Cheers, Iain

A: 

To bar someone form editing an item he should not, I would not edit the edit form of the item but do this by the item's permissions set. Therefore I would add an event handler to the list which changes the list items permissions after its creation, so that only the creator of the document has the permission to edit it.

Informations about event receivers can be found on Brian Wilson's blog.

Flo
Thanks Flo. I agree that yours is the better solution but unfortunately i don't have server access in this instance hence the need to implement via the edit form.
Temple
+2  A: 

Isnt it possible to use the View/Edit access settings for the list? You find them under "List settings -> Advanced Settings" or somthing like that.

JMD
Excellent - thankyou
Temple
A: 
Scott Price
Brilliant - thanks
Temple