Displaying SharePoint Fields by Permission Level
There are situations where certain fields in lists or libraries need to be hidden or displayed according to the permission level of the logged in user. Since there is really no out-of-box way to assign permissions to fields, here’s a way to do it using conditional formatting in SharePoint Designer. This is my favorite SP Designer trick, that I discovered a few months ago.
See my reference (Ian’s SharePoint Blog):
In this example, the field called “Priority” needs to be hidden from everyone except for those users who have rights as approvers on this custom list. Also, there is a field called “Audit Date”, that only approvers need to be able to edit, but other users (even those with edit rights) should not be able to edit this field, and everyone can see it.
Doing this entails creating custom forms for all three forms (NewForm, DispForm, and EditForm) in the list.
1. To keep this simple, create a custom list called “Policies” on your site. There are 4 fields:
Policy Name (changed from the default Title field)
Priority – multiple choice
Notes – multiple lines of text
Audit Date – date/time
2. Create a blank web part page in the same site collection as the Policies list. It doesn’t matter where you save it, since we’ll be deleting it later.
3. Open this web part page in SharePoint Designer. Click on “Click here to insert a Web Part”. This is really just to make sure that you insert this web part into a web part zone, and not some random spot on the page.
4. On the <Insert> menu, choose SharePoint Controls, then Custom List Form.
5. Pick the Policies list, then choose New Item Form. OK
6. Select the entire table row that contains the Priority field. This is the field that we want to hide from everyone except approvers. On the <Data View> menu, choose Conditional Formatting.
7. In the Conditional Formatting screen on the right, click <Create>, and choose <Show content>. On the Condition Criteria screen, click <Advanced…>
8. Select IfHasRights from the list of functions, and then put the number 16 in the parentheses. To see where I got the number 16 (approver permissions), click on the link to Ian’s blog above. Click OK. Click OK again.
9. Next, the Audit field needs to be only editable by list approvers. So, since this is the new item form, we’ll just hide it from everyone else. So, select the Audit Date row, and put the exact same condition on it with conditional formatting.
10. Save this page. It’s okay to customize it from the site definition.
11. At this point, it does help to have some data in your form, so go ahead and create a couple of list items.
Also, I’d like to note that when using custom forms like this, the Attachment button doesn’t work anymore. I think there are blogs somewhere about this bug, but I’ve never tried fixing it.
12. Create a new, blank web part page in the same place you created the first one. This will be the EditForm page. Repeat steps 3 & 4. Then, this time when inserting the Custom List form, select “Edit item form”.
13. Repeat steps 6, 7, and 8 on the priority row.
14. Next, we essentially need to make two copies of the Audit Date field. We want it to be editable to list approvers, and visible (not-editable) to anyone else. Create a new row in the table.
15. Put the text “Audit Date” in the left cell, and put the cursor in the right cell. In the <Data Source Details> pane on the right, select the Audit Date field, then click Insert selected field as –> Formatted –> DateTime. Then, you can opt to uncheck the Time check box, and click OK.
16. Select the row of the editable audit date field. For the conditional formatting, only show the content when IfHasRights(16).
17. Select the row of the read-only date field (the one that was inserted in step 15), and create a conditional formatting rule to HIDE content when IfHasRights(16).
At this point, since you most likely have full control permissions on this list, this row will seem to disappear! While you’re doing this design work and showing/hiding fields, you can go to the Conditional Formatting pane, and click Set Visibility and choose All Formatting hidden. This will let you see the field you just hid. Be sure to set it back to default when you’re done.
HANG in there, only one more form to go.
You know the drill… create another blank web part page…
When you insert the custom list form this time, choose “Display item form”
All we have to do on this one is create a conditional formatting rule that will show the content IfHasRights(16)
NOW, it’s time to save each of these data views as web parts. Go to the browser, and navigate to the library where you saved the 3 web part pages you just created. Open each page export the web part. Save the *.webpart files to your desktop or whatever. In the filename, be sure to indicate whether it’s New, Edit, or Display.
In your Policies list, create 3 new, standard views, and call them “New”, “Edit”, and “Disp”.
On each of these new views:
– click <site actions> and <edit page>. Delete the default list view web part. Be sure to delete it, not just close it.
– Import the associated web part from your desktop.
– Exit Edit Mode
Now that there are 3 new forms in the Policies list, the last thing to do is associate them correctly. (I think that’s the right terminology). Anyway, go back to SharePoint Designer.
In the left pane, under the Lists folder, right click on the Policies list, and choose “Properties”.
Click the “Supporting Files” tab. Change the content type to Item.
Change each of the 3 supporting files to your new Edit, Display, and New aspx files.
Fun! Now test it!
Once it’s just the way you like it, then you can delete those 3 original web part pages that you exported from. Check it out, we didn’t leave anything unghosted!
Here’s my associated video:
Hi, I was looking around for a while searching for audit control and I happened upon this site and your post regarding Displaying SharePoint Fields by Permission Level, I will definitely this to my audit control bookmarks!
Amazing solution! But: can I use it on a document library also?
Daniel, Yes, you can use it on any list or library. Laura
I’m so glad I found this site…Keep up the good work I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog. Thanks, A definite great read.. 🙂 -Bill-Bartmann
Laura, excellent work! I haven’t tried your steps yet, but as I read through them, this solution seems very plausible and less intimidating than I thought it would be.
Hi — Whenever I use the Custom List Form and attach to a list with a “People or Groups” field, the Check Names feature is disabled. Any ideas why, or any fixes?
Hi, Very interesting article! Thanks. I’ve used your conditional formating method on a row and i’d like that this conditional formating could be automatically refreshed when user change a Field value! For exemple, i have a sharepoint list with fields “Title” (text) and “ShowMe” (boolean).I’d like that inside EditForm.aspx, field “Title” could be visible or not when user click on the “ShowMe” field. And Title visibility should be refreshed every time user modify “ShowMe” checkbox. Do you think it possible? Many thanks for your help!
Francois, When I’ve had to do things like that in the past, I had to get a developer to do it. Custom code necessary. Laura
The following article (http://blog-sharepoint.blogspot.com/2009/05/data-view-conditional-formatting-using.html) demonstrates how to create a Data View web part with conditional formatting using SharePoint Designer based on metadata values. The focus is conditional formatting base on dates (start and due dates), as well as the priority for each item in a list to produce a result with colours (text and/or background) formatted to indicate priority or the length of time until due.
Laura, thanks for this great blog..while following the steps shown by you.. i am not able to open my newly created wen part page…it gives me error ” Unexpected end of file looking for tag.” even i do small changes after inserting custom List Form it gives me the same error..can you please throw some light on this ?
I have been following your blog The Audit Field is a DateTime Field – It works fine if we hide or make it read only based on permission by setting condition IfHasRights(16) but doesn’t work if we need to have the text field as read only by following the same process……..Any Suggestions? I have inserted the read only text field as FORMAT>Insert AS Text and also tried inserting as text field …..doensn’t work any suggestions?
Are you selecting the entire row when applying the conditional formatting? When you say “doesn’t work”, I’m not sure what you mean. What’s the error? Note that instead of inserting it as Text, you can put it in there as a form field, and then there’s a Tag Properties pane on the left side of the page. In the tag properties, find ControlMode. It will be set to “edit”, so change it to “Display”.
Hi, Laura! Thanks for the awesome instructions – I got it the first time (which is unusual!). What a useful trick! I’m hoping you can shed some light on an issue I’m having. I’m creating a basic calendar in which team members can submit requests for time away from work. They need to be able to classify their time away as Vacation, PDO, etc. and the total number of hours they’ll be gone, but nobody except the approvers should be able to see it. I’ve got that part working fine, but I’d like the team member who submitted the request to be able to go back and edit it (or delete it), but I’m having trouble figuring out the syntax for that for the Conditional Formatting > Advanced section. I’m currently using this expression for the conditional formatting: “@Author = $UserID or ddwrt:IfHasRights(16)” but the creator of the item still can’t see the field. Any ideas what I’m doing wrong? Thanks so much! Lynley
Lynley, Try using the filter Author = [Current User] You shouldn’t even have to go into the Advanced section for that.
Hi Laura and other readers, I followed this post, and it worked great. The fields are hiding properly. But I have a (small) problem. The new form is missing the red asterisks (*) beside the required titles. The fields are still being required, but the titles don’t reflect it. Does anyone know why this could be happening? Thanks! Leon.
Leon, You can just manually type in a little red asterisk next to the title on the customized form.
Thanks Laura. I had already typed it (the red asterisk), but I was trying to find out why it happened, because it seemed like this kind of behavior could bring more significant problems in more complex situations. It wasn’t a big deal in this case, though. Thanks again, Leon.
Hi Laura. After step 17 when we create the Diplay web part page, what are you refering to when you said “All we have to do on this one is create a conditional formatting rule that will show the content IfHasRights(16)” What content do you mean? All of the row? just the Priorty and Audit Date rows? Im a little confused there.
cdietrick, Step 17: Select the row, and then do steps 7 & 8, except you’re hiding the content instead of showing it.
I am trying to set permissions on items in a list so that only the person who added the item(row) can edit it but everyone can see it. I am creating a list to use as a request queue so that multiple people can add their request(s) and edit only the items they added but everyone can view all the items. Your solution looks great but really only applies to a field in a row. Can you show me how to apply this to a whole row?
Maureen, In the list’s settings, click Advanced settings. There’s a section called Item Level Permissions, where you can set Read and/or Edit access to “all” or “only their own”. This only exists in some types of lists, and not in document libraries.
Thank you so much!! Don’t know why I did not see that when I was looking. I am pretty new to SharePoint and am not used to the interface yet. You saved me a lot of “hunt and peck” time…..love your blog
Hello Laura! I have a problem at step 8. In the “advanced condition” Window i cannot get the “Rows” Folder. I only have a “Rows” File. This icon looks like a sheet? What is wrong??? My view: [-] dsQueryResponse (folder) [+] x:schema (folder) Rows (file)
Problem at step 8 resolved. I have converted the list in XLST. Then the rows get visible
After I insert the ifHasRights(16) at a certain filed gives me the following error: An error occurred during the processing of /teams/gbs-quality/Shared Documents/1.aspx. Unexpected end of file looking for tag. Anyone has any idea for getting this error? Thank you, Andrei
I’m getting an error when I try to set up the Display Item form: No item exists at https://campus.uwsp.edu/centers/intramurals/Documents/test3.aspx?PageView=Shared&DisplayMode=Design&InitialTabId=Ribbon.WebPartPage&VisibilityContext=WSSWebPartPage. It may have been deleted or renamed by another user. I think that I’m doing something wrong in this part of your instructions: “All we have to do on this one is create a conditional formatting rule that will show the content IfHasRights(16)” I didn’t really understand which row or part of the form the conditional formatting rule was supposed to be applied to so I tried it on the priorities row but it didn’t work. Do you have any idea what I’m doing wrong? Thank you
Hi Laura, I have a scenario in sharepoint 2010 where I need to disable some fields for some users and enable the rest for other level. Is there any possiblity for that? Please let me know. Thanks in Advance, Unnath Dev.
Hi Laura, I hope that you are still monitoring this posting. This works good with the following exception. When I open the item in Edit in the list it is displaying the inputFieldLabel. On the form I have the tage set to ‘False’. If I remove the parameters for the ID# (/Edit.aspx?ID=3) it displays properly. Not sure why the difference. Thanks, Richard
hi Laura, Nice blog – thanks! Im dealing with the Column permissions. You wrote in MSDN social forum that to hide columns is possible by your workaround. So I tried this but all i get is some different views when creating new or editing or showing an item. But what i want is that the whole column in my list shall dissapear by default when a person (not 16) calls this page. can u help?
Bernegger, Yes, you’d create a multiple item view of the whole list, and select a value in the column you want to hide, and then click the Create button in the conditional formatting pane, and set up your logic. Please watch my DVWP screencasts to see how to create the list view.
thanks so far, Laura! i did all the steps as you suggested. the only thing is that i can’t change the content type to item in SPD 2010- there is no supporting files tab. (haven’t found yet) so what i did is I changed my 3 new forms, which are displayed underneath to the 3 commons, to standard. Unfortunately this is not enough. How did you workaround this in SPD2010?
My current project requires ability to display choice column value via color or image associated with a choice But Sharepoint standard packaged misses that control I am looking for available solutions on market I came across http://sharepointfields.com Does anybody has experiece using it?
except the hide/read permission settings in the forms (what works perfect!), what about hiding columns in “AllItems” for certein groups/users? e.g, this particular group of users must not(!) see the salary band in any case (list, forms, export into excel,..) thy alex
Bernegger, In 2010 the interface is completely different. When you click lists and libraries on the left and click the name of your list, that page has a “forms” section on the right, with a list of all the default and custom forms. Simply click the name of your form, and in the ribbon there’s a button to make it the default. Den, You can do conditional formatting of images using show/hide based on conditions. Put all the images in a cell and then select each one and create the conditions to show or hide it. Alex, First of all, you’d have to create a custom permission level that doesn’t let the users create their own personal views of the list. I don’t typically like modifying the default allitems view, but would create one just for those people. You could create a data view web part and put it on a page and use audiences to control who sees that web part. That’s not true security, though.
Hi Laura. I’ve used this in the past and agree, it is among my favorites. I’m also looking for a way to do conditional formatting (hide row) if the AssignedTo column = [ME] or current user. I can apply the conditional format but it has no effect in the design pane. If you happen to know the answer or run accross it I’d love to see it in a post!
Hi Laura, I have experienced the same problem as Huzefa and Andrei, i.e., I get “Unexpected end of file looking for tag” after I insert the ifHasRights() function while following the instructions in the web page: http://www.endusersharepoint.com/2009/09/17/custom-form-edit-fields-based-on-permission-levels-in-sharepoint-screencast/. Prior to making the above change, I edited the same form by following the instructions in your web page: http://www.endusersharepoint.com/2009/09/11/customize-form-pages-in-sharepoint-screencast/ without encountering any problems at all. I was working on a copy of the EditForm as advised and at no time edited the original EditForm. However, when the “” error appeared, it also seemed to affect the original EditForm, and I had to replace it with the EditForm from a similar list. It should be noted that in Code View in SharePoint Designer the tag is still definitely located in its correct position. I then repeated the entire two stage exercise (i.e. following both screencasts) in the same sequence with exactly the same result. Having regard to your remarks about working on a copy of the EditForm and not on the EditForm itself, and bearing in mind that at the end of the first screencast we make the modified EditForm the default, is it possible that having nominated the modified EditForm as the default BEFORE starting the changes outlined in the second stage (i.e. before installing the ifHasRights() function) this is contributing to the problem? What I mean is, is the problem arising out of editing the current default form? Note also, that if I edit the version of the form at the end of the second screencast to remove the conditional formatting that has been added and remove the added table row to end up with a form that should match its original state, the “” error continues to appear. I would be grateful for any advice. Best wishes, Alan
Dave, That wouldn’t be a conditional format, but a filter instead. Create a new filter where Assigned to is not equal to [Current User]. You don’t even need a DVWP to accomplish this, it can be done in a regular list view. Alan, I don’t know, all I can think to say is that when you insert the new data view web part as a form on the page, look in the code and make sure you’re inserting it inside of the web part zone, which would be before the
Laura, I have a list with 10 columns and based on the condition in one column ie status turning “complete”, I want those select rows to be put into another list dynamically. Can you help me create this dynamic list? Also, I did read about content query web part but its not available in my sharepoint site. Guessing its because I am using an enterprise sharepoint site. Thank you !!
Hi Laura, i was trying to follow this guide with SP2010, but it’s really hard to find things (i have never seen SP2007)… With a lot of difficulties i have reach point 8. but i cannot find the “IfHasRights” anywhere. Have you ever done trick this in SP 2010? Eventually could you please explain me exactly how? Thanks
Rbrinda, This can be done using a sharepoint designer workflow. Use the condition of the certain column = complete, and then the action is “create list item” or “update list item” (update if the item exists already). Then you put the fields from the first list into the other list within the create action. Maikol, I haven’t tried it yet in sp2010.
If you are not familiar with SPD. you can try Infowise Smart List Lite. its free and one of its features is setting permissions on a column/field so it definitely can do the job. You can check it out at – http://www.infowisesolutions.com/product.aspx?id=SmartListPro Ethan Infowise
Thanks so much! It works like a charm. You solution is the easiest and neatest.
Thanks for a wonderful workaround
is your new book only for end users?
It’s for business users / information workers / solution architects / project managers… that type of audience. You can click on the link and on the Amazon site it has a link to “look inside”, so you can see the table of contents, etc.
Great idea and well explained. However, users can still use a datasheet type view to edit the hidden or non-editable feild, can’t they? Is there a way to restrict that as well?
Great post, works a treat. I did this on a large list (approx 20,000 items) and found the New Item file taking approx 20 sec’s to load. The view and edit files were fine. Found this post http://social.msdn.microsoft.com/forums/en-US/sharepointcustomization/thread/9df9bcbd-2d75-46cf-9f43-377b605de753/ which suggested a great work around (however bizarre!).
Hello everyone. I am new to sharepoint , i need to hide some approval cloumns to the users and same should display to the approver group. Please suggest me , how can i do that? the given description is giving idea but i need step by step approach. Please help me . Advance thanks subhash.
I have used this on several lists with great success. Recently I had to do a list that accepts attachments and I noticed that the display form does not include that atachment. The input form worked as expected and I was able to attach a file. If I place the item in edit then the attachment field returns. Am I missing something or is this a problem using this method. Thanks, Richard
I’m sorry I have been trying to customize one the lists, I followed the guide you provided me with but I have 2 problems 1. I do not know how to do this: 2. In your Policies list, create 3 new, standard views, and call them “New”, “Edit”, and “Disp”. 3. On each of these new views: – click and . Delete the default list view web part. Be sure to delete it, not just close it. – Import the associated web part from your desktop. – Exit Edit Mode 2. and I also got this error message, and I have no idea what the problem might be An error occurred during the processing of /sites/XXXXX/forms test/Shared Documents/New Web Part Page.aspx. Unexpected end of file looking for tag. I really appreciate if you can try to help me clear this up. thanks
Hi Laura, I have a general question for you or anyone else who is reading this blog. I have created a custom list and converted to an XLST view. I have conditionally fomatted each column individually. Each text within the column is formatted to show red if the [Due Date] is less than or equal to the [Due Date] and if the [Due Date] is greater than today’s date, it should show green. This works perfectly for every column accept the generic Assign To column provided by SharePoint 2007. When the cell within this column is formatted as text, it shows the HTML code. When I change the cell format to Rich Text, it shows the name of the person assigned the task without the correct formatting. It shows it as a dark red (not even a vibrant red as the conditional format suggests) and regardless of the due date, the text color is red. Please advise. Thanks.
Laura I’ve trying to hide the EDIT icon from a list when a user was not the person who created the item. For the condiitonal formatting I’ve tried the filter Created By = [Current User] but it does not work. In an earlier post you said to use the filter Author = [Current User], but there is no Author field in the drop down list of fields. Is there something I am missing? I am doing this with SharePoint 2010.
Ben, Not in 2007, but in 2010 you can turn off the ability to use datasheet view, in the list/library settings. Richard, That’s an old bug that’s pre-sharepoint 2007 SP2. Install SP2 not only on the server but on your SPD client. Here’s my post about it: http://www.sharepoint911.com/blogs/laura/Lists/Posts/ViewPost.aspx?ID=10 Esteban, When you insert the form, it’s tricky, you have to make sure and put it inside the web part zone. I demonstrated it in this screencast: http://www.endusersharepoint.com/2009/09/11/customize-form-pages-in-sharepoint-screencast/ Shigady22, Try using “contains” instead of “equals”. The people fields’ data is stored as a bunch of HTML.
Hi. Laura, You are so cuite
Laura, I have a attachments on the task list. How can I get the attachment columns so that it allow user to upload files?
Laura, Really great post! Unfortunately, I’ve hit the same problem as Kalik230@yahoo.com reported back in August. I’m using SPD2010 with Server 2010. Your steps work great for creating the new web part page for the new item view. However, when following the steps to add the custom list webpart for the edit and display views, they report the following error when viewed on the SP site: “[SPException: No item exists at http://rnod-spsw01:108/EngineeringPA/systems/Lab Documents/poldisp.aspx. It may have been deleted or renamed by another user.]” If I take the same web part page, remove the custom list webpart and replace again using the new item view, it displays fine. This seems like a SPD or SP defect, but maybe I”m doing something wrong?? Any thoughts? Thanks, Kirk
Bill, I’m not sure I understand what you’re asking, and what it has to do with this permissions solution. Can you please rephrase? Kirk, This post doesn’t apply to sp 2010. In sp 2010 you’d create a new form by simply clicking the new form button in sharepoint designer.
SOLUTION to the Error…. AHH!!!! URGH!!! After redoing this exercise over and over again i finally realized that the reason for the error was because when I saved the New, Edit or Disp aspx file, that the application was lopping off the ALL of the code from the tag () where the Custom List Form was being inserted. Thats why when you get this error, you cannot open the file in from SharePoint. You have to open it from SP Designer and click on code to see the real problem. SOOOOOOO…. It is a problem with the Designer version itself. I was getting the problem on one machine but not on another. I then, uninstalled SP Designer 2007 and installed the latest version found here ( http://www.microsoft.com/download/en/details.aspx?id=21581 ), redid the exercise and bye-bye error. All was good and this blog rocks! 🙂
Hi Laura! Like PhilippK, I encounter the same problem. My Rows is showing as a file instead of folder icon. I not sure how to convert it to XLST. There is no ‘Convert to XLST selection’ Pls kindly advise what I might have gone wrong. Thanks
GK and Phillipp, I’m sorry, I don’t know what you guys are talking about. In the screenshot in step 8 all I did was put a function in the big white box, I didn’t do anything with the fields on the left.
check out this solution http://splistdisplaysetting.codeplex.com/ as it makes job so easy by avoiding all the steps mentioned above
Laura, Thanks. Nice article. But I have an issue though. I am displaying a column only to “Approvers” in “Edit Form”. It works fine. However, I am displaying the same field for all on “Display Form”. In “DataSheet View” the contributors are able to edit the field which I don’t want it to happen. How do I hide the field / prevent from edit in datasheet view ?
Mahesh, In SharePoint 2010, there’s a setting in the list’s advanced settings that lets you turn off the ability to use datasheet view. This setting doesn’t exists prior to sp 2010, though.
Your posts was a starting point for me for doing modifications in SPD 2007. However I am stuck at a place where-in I am doing similar modifications for a discussion board. I am using designer to customize a form such that I show all basic properties like discussion subject and description while replying to a discussion. I am not able to get the values of the respective discussion while replying. Any guidance would be appreciated.
Ashish, Discussion boards are very weird. They use a couple of different content types, so any kind of modifications are not very straightforward. I’ve generally managed to avoid them, so I don’t know how to answer your question.
I need to offer one set of fields to edit to one SP perm group (or set of AD users) and another to another group. How would/Can I do that using your wonderful approach to this? Or did you already answer this above and I missed it?
Hi Laura!!! wonderful work, I already used it and it works like charm!!! I have a different question for you, and Im sorry about changing subject… I have seen you page and you are using sharepoints drop down menu at the top… how did you manage to personalize the graphic look of the pop up sections? I couldnt find any css styles to change in sharepoint css stylesheet…. my email email@example.com
It’s very interesting and helpful. It saved my time. SPD is a ocean. We have to learn so many things. ** Thanks Laura **.
Lisajo, No, there isn’t a way of doing that. This is only based on permission levels, and I don’t know of a way to do it by AD group. Mackus, I just used the “Community Kit for SharePoint” from codeplex.com to get the theme for my blog. I don’t know how the CSS works.
Hi, I want to allow the user to edit the field, if “Assigned to” is equal to logged-in user. How can I do this.
Sivakumar, Okay, at step 7, don’t click Advanced. Just set the condition so that field Assigned To is equal to, and then select [current user] from the drop-down box for the Value.
This is one of the best articles so far I have read online. No crap, just useful information. Very well presented. Thanks for sharing with us. Check out this link too its also having a wonderful explanation on getting permission level from sharepoint using c#… http://mindstick.com/Articles/06e20e89-d95f-45a2-b3cd-7fd011ed8738/?Getting%20the%20permission%20levels%20from%20SharePoint%202010%20using%20C# Thanks
I have a workaround for the tag issue rather than installing a more recent version of Sharepoint Designer.
Please note that I am using Sharepoint 2007 with Sharepoint Designer 2007.
Instead of inserting the custom list into the web part you created for NewItem/EditItem/DispItem, insert your custom list into a blank page. Apply your conditional formatting and select the entire form. Switch to Code View and copy the highlighted code.
Return to the webpart you initially created, making sure you are in Split View. Find the second instance of “..” and paste the custom list code in between the tags. Save.
Return to your browser and test to see if you receive the same error.
First off, great blog entry. While I didn’t follow these directions exactly, this lead me to find exactly what I needed. Thanks for that.
A question for you: is there a way to check for the WebPartManager.DisplayMode in Sharepoint Designer? I have my new custom form in a web part page along with a few lists, and the form keeps checking for server side validation when I sort lists. If I had access to CodeBehind, I could fix this by enabling or disabling validation if BrowseDisplayMode == true. Just not sure how to do it with Designer.
Sorry, I don’t understand your question. I’m not a developer.
Excellent Post Laura !!!…nice workout…
Thank You Laura, such a excellent post.
There is a remedy we can work out with Attachments link also. below is the Microsoft article and follow the steps to work with Attachments.
Hi Laura, great post.
I can’t however work out one part, when discussing the views near the end, you say –
Import the associated web part from your desktop…
I just get a load of html text, is there a specific way of importing this file?
Sorry for my ignorance I’ve been using SP for less than a week.
Never mind cracked it.. Thanks Laura this is great and the conditional formatting capabilities have opened up all sorts of abilities I didn’t know about.
You are now officially my favourite person that I have never met and know nothing about.
Thanks for the excellent post. I have a question, which is not directly related to the post, but close.. I have a requirement to make a column/field read-only based on their permission level. Do you know if there is an easy (SPD 2010) way of doing it? I am not a developer, so don’t really understand the suggestions posted on some internet forums.
I Cant get your 16th point in your Blog after that I got confusions Please help to get me out
Thanks Wayne, and I’m glad you found the “Export…” menu option. 😉
Yes, step 16 show you how to do that.
I have got following error when I try to open EditformPage.asp to export webpart
No item exists at http://IPAddress/Site1/SiteAssets/EditForm page.aspx. It may have been deleted or renamed by another user.
Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: 2f3af910-bde4-4b3c-b516-ea0bc9e14d44
Date and Time: 6/13/2012 11:15:14 PM
Please let me know, What I am going to do wrong.
Would you like to send me your skype name.
When you say:
On each of these new views:
– click and . Delete the default list view web part. Be sure to delete it, not just close it.
– Import the associated web part from your desktop.
– Exit Edit Mode
I’m obviously missing the “Delete the default list view web part”. Do you mean, switch the view to one of the new views, then click on the web part menu arrow that is existing in that view, then select delete? Because, when I do that the part is deleted and I am automatically kicked out of the edit page mode.
Also, when I go back into SharePoint Designer and right click on the list item I created, I don’t get the “Properties option. I only get “Rename”, “Delete”, and “List Settings”.
Where did I go wrong?
It’s called Editform.aspx.
Are you using 2010? If so, these forms can be created a different way. In sharepoint designer, open your list, and look at the “forms” section, which will show the 3 default forms in there. Use the New button to create a new one of each, and just give the new ones a different name and leave the old ones alone, and you can make the new ones the default. On these new pages, you can delete whatever web part automatically gets put on there, and place your new one.
To answer your question, though. Yes that’s what I mean, and I’ve never seen it kick me out of edit mode when I do that.
It’s right click on the actual name of the list, not the files you just created.
I tried to follow but I got always duplicated content when I created new item in my list.
What I missed?
Sorry Snoopy, but I’ve never seen this happen.
Hi Laura, great post! Is there a way this can be done when the user accesses the site from a mobile devise? This is more so for SharePoint online.
Sorry I don’t know how these pages render on different mobile devices.
Im using SP2010 and seem to be experiencing the same issue as Sean above. I tried following your instructions in your comment to Sean but I must admit that I got a bit confused. Could you please explain a bit further?
Great blog by the way.
Thank you for your excellent post. I created a custom list successfully based on your instructions.
I would be grateful if you could advise me if there is a way to add extra column onto an existing custom list. Realise that new column created does not appear in the form.
Open your custom form in SharePoint Designer. Put your cursor in the table where all of your existing fields are on the page. Notice that there are tabs at the top, for the contextual ribbon. There’s a button on one of them that lets you add a row to your table. Just add a row where you want to put your new field. Then, look at your fields listed down the right in the data source details. Drag the field you need to add… to the form. I recommend looking at the code. For the field label, I usually mimic what I see in the code for some of the other fields, so that the text will look similar.
Hi Laura, i found your blog by searching on how can i hide a column based on the value from other column using sharepoint designer.
Suppose i have these dropdown column:
Category: Project and Finance
If i choose Project, the second column for Live Date will be available to fill-in. If i choose Finance, that column will be disable/hidden.
You can do that with InfoPath very easily, just not with this particular type of solution.
Iam using 2010 sharepoint. after creating the newform for hiding the ceration fields based on the Permission. i have saved it. But when i go to the sharepoint list for creating new form. iam getting the error. cannot open the web part.
The below is the error message.
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator
It’s possible that since I wrote this back in 2009, for SharePoint 2007, maybe this method doesn’t work in newer versions of the product.