SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Development and Programming
>
How do I hide a column in a custom list (edit and new forms)?
How do I hide a column in a custom list (edit and new forms)?
- I want to have a column that by default is today's date. But I do not want it to show in the new or edit forms. Is there a way to do this? I want it to use for a calculation in a view, but I do not need the user to ever see it.
Answers
- Shivannarayana,
"My question first, have you created a separate column to show the today's date?. If yes, you dont have to create it,you have in built column created for you. This is created read only and which will not be shown when in the new or edit form."
I don't know which field do you mean here, but if you mean the Created field, it will show Today only the day the item was created. The next day it will show Yesterday. :-)
If you create a calculated field having Today in it, it won't be updated each day, unless you go there (from the UI or from code) and update the item.
Corey Roth,
"If you are creating your custom list using a feature, you can edit the Field element in the CAML for the particular fields you do not want to show. You can add ShowInEditForm and ShowInNewForm attributes and set the value to false to prevent those fields from showing up on your forms."
One can set these properties on an existing filed (or just when adding the field) from code too, so the field can be hidden as requested in the original request.
Peter- Marked As Answer byAaron Han - MSFTModeratorFriday, November 13, 2009 10:04 AM
All Replies
- If you are creating your custom list using a feature, you can edit the Field element in the CAML for the particular fields you do not want to show. You can add ShowInEditForm and ShowInNewForm attributes and set the value to false to prevent those fields from showing up on your forms.
Corey Roth blog: www.dotnetmafia.com twitter: twitter.com/coreyroth - You can do it by setting the field as hidden in Content type setting page . Go to Advance setting -> enable content type editing on site setting page
- Proposed As Answer byshiva.g Friday, November 06, 2009 6:36 AM
- Hi,
My question first, have you created a separate column to show the today's date?. If yes, you dont have to create it,you have in built column created for you. This is created read only and which will not be shown when in the new or edit form.
Hope this helps you .
Thanks,
Shivannarayana.- Proposed As Answer byshiva.g Friday, November 06, 2009 6:36 AM
- I did finally notice at I could do a sort on a date column and compare it to [Today].
- Shivannarayana,
"My question first, have you created a separate column to show the today's date?. If yes, you dont have to create it,you have in built column created for you. This is created read only and which will not be shown when in the new or edit form."
I don't know which field do you mean here, but if you mean the Created field, it will show Today only the day the item was created. The next day it will show Yesterday. :-)
If you create a calculated field having Today in it, it won't be updated each day, unless you go there (from the UI or from code) and update the item.
Corey Roth,
"If you are creating your custom list using a feature, you can edit the Field element in the CAML for the particular fields you do not want to show. You can add ShowInEditForm and ShowInNewForm attributes and set the value to false to prevent those fields from showing up on your forms."
One can set these properties on an existing filed (or just when adding the field) from code too, so the field can be hidden as requested in the original request.
Peter- Marked As Answer byAaron Han - MSFTModeratorFriday, November 13, 2009 10:04 AM


