31 October, 2006

Create a custom list form for a SharePoint list

SharePoint has always been good for basic business forms. A custom SharePoint list can be configured to collect any type of data and SharePoint automatically generates the forms for adding new items, editing items and viewing items. In SharePoint 2007, the workflow capabilities make SharePoint lists an even more attractive foundation for basic business forms.

In order to manage the data you collect from the form submitters, you will often have a few extra columns (e.g. status, notes, etc.) that you don't want the user to fill in when submitting the form. Using SharePoint Designer you can create a customised version of the form for adding new items that does not have your extra management columns on it.

  1. Open your site in SharePoint Designer.
  2. Browse to your list and open the 'NewForm.aspx' web form.
  3. Go File > Save As... and give the form a new name such as 'NewForm2.aspx'.
  4. Delete the default List Form Web Part from the page.
  5. Go Insert > SharePoint Controls > Custom List Form.
  6. In the List or Document Library Form dialog, select the appropriate list, content type and type of form.
  7. Click OK and a new Data Form Web Part is added with controls representing all the fields from the list (in my environment all the controls show "Error Rendering Control" but this does not affect the final result).
  8. In the newly added Data Form Web Part, delete the rows containing fields not to be shown to the user (ensure that fields being removed are not required fields without default values as this would prevent the user from submitting the form).
  9. At this point, you can do other customisation such as rearranging the fields if you wish.
  10. Save the site.

To give users access to your new form, publish a link to the NewForm2.aspx page. By using the Source query string parameter you can direct users back to where they came from after submitting the form. For example, if you publish the link on 'http://portal.example.com' then the URL to the form would be 'http://portal.example.com/Lists/YourList/NewForm2.aspx?Source=http://portal.example.com'.

Stay tuned to my SharePoint musings: Subscribe via email or RSS.


Trev said...

Thanks Kristian.

this post saved me!

Tagorenet said...

Nice one...

We did the same for EditForm.aspx page (Document library) . Its showing all the controls and updating the page successfully. But only problem is when we try to edit using "Edit Properties", its going to root site and giving error message.

But when we give the correct url on the browser, then its working fine...

Please feel free if the question is not clear...

Please help me out from this problem...

Is it possible to get the old copy of editform.aspx (Accidentally we modified the original copy )?

Thanks in advance,

Kristian Kalsing said...

You need to specify that your new edit form is the default edit form for the list. This can be done in SharePoint Designer:

1. Open the site in SharePoint Designer.
2. Right click the list in the Folder List and select Properties.
3. Go to the Supporting Files tab.
4. Use the Browse button to enter the path to your new Edit item form.

Anonymous said...

Hi Kristian,

This is a great way to customise those boring default forms.

However, when I followed your instructions, in my new form that I created using the dataformwebpart, my attach file button was no longer working. The error that I received was "This form was customized not working with attachement."

I am wondering if you have ran into the same problem?

Best Regards

Anonymous said...

Please after following this procedure it convert nicely

In the form I have a lookup field and I want to lookup no at th full table but at the filtered part.

How can I do that ?

Thank you


Anonymous said...

Hello Kristian,

I have the same problem as someone before. My Attach File button is not working anymore. I received the same Error Message: "This form was customized not working with attachement."

Any help is appreciated.
Thanks in advance.

Kristian Kalsing said...

I have experienced the same problem with the 'Attach File' button for custom list forms. I was using Beta 2 TR. I'm hoping it will be fixed in the final release.

Kristian Kalsing said...

I have now confirmed that the "This form was customized not working with attachement" error is still there when using the RTM versions of both WSS 3.0 and SharePoint Designer 2007. I hope this will be addressed at some stage.

Anonymous said...

Hi, I have too this problem "The page you have selected does not contain a reference to the correct SharePoint list. Please select another page"

Any solution?

Anonymous said...

Hi, the problem of "The page you have selected does not contain a reference to the correct SharePoint list" gives only with document library, when I use custom list, it gives me the error "This form was customized not working with attachement" . Any solution?


Patriot said...

When I try to follow the instructions, the custom list form in the insert menu is greyed out. any one has an idea?

Anonymous said...


Thanks a bunch. I followed your code and it works perfectly for me.

I do have a question and maybe you or someone else can answer it.

We are using MOSS as our CMS system. I have a created a list and a form to insert data. When I try to view the form as an anonymous user, I'm prompted for a login. I'm assuming I need to make permission changes to the list. Can someone help me out?

Kristian Kalsing said...

You need to make sure that anonymous users have permissions to add items to the list.
Go to the list settings of the list and click 'Permissions for this list'. Under 'Actions' you select 'Edit Permissions' and confirm to break the inheritance of permissions from the parent (the site). You will now have a 'Settings' menu where you can select 'Anonymous Access' and you will be able to give your anonymous users permissions to add items to the list.

Anonymous said...


Thanks for telling me how to add the anonymous access.

nils said...

I have the same problem with Attachments. Please, help.

Anonymous said...

I made my custom dispform for my list (dispform2.aspx), but my content query webparts displaying items from this list still redirect to old dispform.aspx. Links from list web part are ok. How to make content query web parts to link to new disp form??

Kristian Kalsing said...

Have you tried to recreate the Content Query Web Part after you made your list point to your new display form?

Bill O'Brien said...


i need some help understanding how to use some simple tools of sharepoint designer. can you help.


Devrim Baris Acar said...

I did the customization for new item and when I click "New" I get a popup message giving "Invalid page URL:".
And I cant set the newform.aspx as the new item form in support files.

BTW,I am using WSS 3.0.

Does anyone have an idea?

dattard said...

I've seen a comment on Filtered Lookups on SharePoint 2007. I've blogged about this on my blog: http://dattard.blogspot.com/2007/04/sharepoint-2007-filtered-lookups.html

Anonymous said...

So, has anyone figured out a way to make attachments work?

I've gotten sofar as to the custom new list item form actually expands and accepts the upload, however it does not seem to save it to the item's attachments.

The attachment information is ignored.

Any other ideas on how to build a custom based form that works with attachments?

CMc said...

Thanks for this, it looks like just what I need.

I'm having an issue getting started though. I remove the ListFormWebPart (leaving the zone in place) and go through the steps of adding the custom list form control.

I don't recieve any errors but when I hit OK it clocks for a second, marks the page as edited, but nothing appears in the page.

I've tried this both inside and out of the webpart zone with no luck.

Any help would be really appreciatted.

Vikram said...

I wanted to add a webpart to dispform.aspx. It worked great using sharepoint designer. The problem is that I want this modified dispform.aspx in my custom site defintion or created as a feature, has anyone done this?

Suneetha said...

I created a custom edit form for a document library and when I tried to associate my custom form to the ducument library by browsing to my form under Supporting files tab, i get the following warning message."The page you have selected does not contain a reference to the correct SharePoint list. Please select another page".

Can you help me to fix this issue??

Mala said...

I have set up a MOSS 2007 site and have granted anonymous access to the entire site. I can browse the home pages anonymously. When I try to access the lists, I am getting error " Access Denied". Can u help me to fix this issue.

Any help would be appreciated.

Michael said...

Any way to create a custom edit form like this for user profiles?

srini said...

Thanks for the nice posting..

Can you tell me how to custom sort a drop down list which is a "list form field".


Sowmya said...

Deployment of the custom created list.

1.In the DispForm.aspx, first hide the default WebPart showned.
2.Created the Custom List Form in the same page.
3.Did some customization.
4.For deployment to another server,took a back up of the whole site and restored in the new server.But found that the custom created form is not displayed.Whereas the default webpart is getting displayed.

Please clarify if any one you know the deployement of the SharePoint website with Custom Created List.

Anonymous said...

I have a work around for the issue with custom forms and attachments. It's not elegent, does not address the cause of the issue, is only any good for new items and will not help every one, but, it worked for me.

The main reason for custom forms is to hide certain fields from users such as those used for calculation etc.

1) Save the list with all the fields as a template

2) Create a new list based on this template

3) Remove the fields from this new list that you don't want to appear on the user form.

4) Add an 'auto' workflow to the new form to copy the list item to the origional list and then a second step to delete it from the new list.

Hope this helps someone

Renato Golia said...

>When I try to follow the >instructions, the custom list >form in the insert menu is greyed >out. any one has an idea?

I'm getting the same problem.

sameer said...

I tried to Insert Custom List form , selecting the Edit form , in my document library.
Nothing happened!
I am expecting a list of edit form controls to come up , which belong to the document library.

Please help what am i missing.
is it a configuration problem.


Anonymous said...

Hello Kristian,

What do you do if the Custom List Form is grayed out in the Go Insert > SharePoint Controls > Custom List Form?

Thanks in advance,
T. Castle

Shashank said...


I'm trying to have the Content Type displayed in the NewForm.aspx and let the form change the fields based on the selection of the content type, exactly like the option we have in Edit form. Can anyone help? Thanks in advance..

Ric Brennan said...

People interested in this topic might find these helpful.

On the MS Office site there is a step by step tutorial on this using SharePoint Designer

Also, David Szabo has a good article on his blog "Custom list NewForm.aspx ruined in WSS 3.0 ".


Anonymous said...

I created a new aspx file, but when I click on OK button after selecting the doc. lib. OR list, content type and Type of form, nothing happens!! What am i missing here? Thanks in adv. for any help.

Anonymous said...

Pity one canot do this in Sharepoint 2003 :(

Avinash said...

Do you have some idea to resove this issue:-
In a share point picture library. When user click on a picture, by default the picture open in the DispForm.aspx with default toolbar (SharePoint:FormToolBar) having options

- Edit Items
- Delete Item
- Manage Permissions
- Mange copies
- Check Out
- Alert me

We need to customized it, so that the DispForm for this picture library will show toolbar having options only
- Edit Items
- Delete Item
- Alert me
This customization should not affect other picture library running on the same server. Should be applicable for a particular picture library site only.


Anonymous said...


Attachments are not saving to list.

Any solution?

Anonymous said...

I can create drop down menus that populate from a datasource in my custom NewForm2.aspx page, but I can't create the same drop down menus in the editform.

Any help???

Anonymous said...

Where the hell this viagra come from?

Anonymous said...


Custom list attachment is working. But its not saving to List...

Any solution?

Anonymous said...

Thank you. You are good.

Anonymous said...

Hi Kristian,

Excellent artcile!!!Is it possible to assign the custom list form to all the document lists of the a site at once instead of individually?


Thomas Carpe said...

If all you want to do is hide fields from the user, I recommend you consider creating a content type instead of using a custom list form. The content type for the site automatically creates a child for the lsit when you enable the content type for that list. Then from list settings simply click the name of the content type and then click the field you want to hide and change it to hidden. It is a shame but seems they did not provide an option for Read Only here, only Required, Optional, and Hidden. You can always use the standard list form and add an additional custom list form web part to display the extra fields at the bottom. To me that seems more maintainable. I sit here now looking at my pretty custom list form and shuddering in terror that my users will ask my to add a field to it or something.

Anonymous said...


We followed your custom list instructions and found that we lost the link to create or edit, it went to root site. After some research we found that instead of Deleting the default List Form Web Part from the page Hiding it (Right Click Web Part Props) then create a new one underneath works great.
Hope this helps other users.


Anonymous said...

Hi Kristian,

Thanks for this article. However, I added a custom column to my list (a simple choice field), which is not appearing in SP Designer when I follow your instructions. I need to add this field both my NewItem and DisplayItem forms. Any thoughts?

Doug in Brooklyn

Reema said...

Thanks Chris, this really helped me a lot! Go blogger!! Thank you so much - Reema Pereira

Mitali said...

I want to change the default dispform.aspx for a picture library. Can we change that? Kindly help with how to do that....

Thanks in advance

Hansie said...

Hi Kristian

Using Visual Studio 2008 to create a content type you create a feaure.xml
and a contenttype.xml. lets say you want to add a custom edit page that will be bound to this content type. How would you do this through visual studio , and how would you deploy this to a site collection.



Koms said...


Quick question for you...can the same be done to the upload form? We have a site that requires users to upload documents but we want to ask them certain questions on the form...I haven't been able to figure out how to do this so was just wondering if this method could work. Appreciate any help. Thanks!

Garth said...

Thanks for this.

Theresa said...

Taking what Thomas said back in October I created another content type with only the fields I wanted a user to see when they created a new item. Then I created a simple workflow that updated the content type field to the "full-blown list of fields" content type. Simple. And no custom javascript programming or broken attachments!

Dave M said...

For all those who are having problems where nothing shows up after adding the custom list form... I had the same problem and I realized that the SharePoint Designer was using an IP address to connect to the site. However, you have to make sure you are using the same URL to connect to the site that you have set up in the Alternate Access Mappings in the Central Administration.

Anonymous said...

Can anyone help me with this? I created a custom DispForm.aspx page for a document library. Accidently deleted the original. When I enter the URL for the custom document library page it opens with no errors. But when I hover over a list item in a view and select View to go to the display form, the page give me a "Error: Access Denied" message. When I go to the properties of the document library to edit the Supporting Files, there is not option to edit the Display Form path.

Anonymous said...

I am facing a small problem in the "EditForm.aspx" of a custom list. I have created a user for my site and the user also has "Contribute" permission for the list. But when the user attempts to edit an item in the list, the page properly navigates to "EditForm.aspx", but after making the changes and when clicked on "OK" its throwing an error message stating "Access Denied".

I'm badly stuck in this....
Pls help me out...

Thanks in advance,

CM said...

Anyone having luck with the attachments not working when creating a form? If so, could you provide steps to fix, written for us non-supergeeks

layla said...

Hi Dear Kristian
I read your post and it definitly seems useful. I have done something like yours to create a custom form but with some problems. I want to explain my case to see if you could help me:
we have two lists of Activities & Comments. I didn't use blog template becuase we would so then need lots of customization. Anyway, I have two lookup column on Comments named :Activity_ID & Activity_Title. I created a custom "ViewCustom.aspx" with three DataFormView webparts; WP1-> Dataformwebpart(single view) to show a specific Activity /// WP2-> Dataformwebpart(Multiple view) to show activity related Comments( using webpart connection) ///WP3-> DataFormwebpart (New Item) to let user add a comment with title and body.

Now the problem is that I don't know how to connect the new Comment entry to that specific Activity. I need to set (Comments--> Activity_ID)parameter in WP3 to the (Activity-->ID) parameter from WP1. ! I couldn't found webpart connection useful here.
And my second problem is with list links. I changed the Display item form in Supporting Files tab of Activity list properties to "ViewCustom.aspx". But it's out of work! :(

Please help me to solve the problem even if by suggesting another solution.
Please feel free to ask me more information if required.

Many Thanks


Anonymous said...

A solution to the Attachment problem exists! Check out my entry here: http://cid-6d5649bcab6a7f93.spaces.live.com/blog/cns!6D5649BCAB6A7F93!130.entry

zed said...

I created a dispform2.aspx. Somehow when I select "view item" it uses dispform2.aspx. How do I revert to using the originial Dispform.aspx?

tpottrof@amazon.com said...

I've created tons of New Item custom forms and they all work great ( I have a table that has about 50 different columns, but only one form needs 7 of those columns, another form needs 15 different ones, etc.---I'm very happy I managed to make it all work).

But now I have the problem w/ the dispform.aspx. I created a copy but then somehow wrote-over the original. I can't get the original back and I can't manage to create a "new" original (adding the regular list form, rather than the custom list form.) I just get an error message that the web part isn't working.

So I've tried going ahead w/ the custom list form. The file is attaching to the list just fine (list name > properties > supporting files...) but its not working. When I try to view properties, it takes me to the main server page and the link is really messed up. It has the portal starting code---skips the information where it names my site, the list I'm working with, and dispform.aspx----then lists the ID=## like its looking for that record # in the main portal site and not my personal site.

I would love help on this from anybody who has even a slight idea.


vj said...

You helped many people, and now me also.

you are really great.

Anonymous said...

I have a custom list that is to store links to other documents within the sharepoint site.
Ideally I would like the NewForm.aspx to have the url field and a browse button that will open a popup to browse the sharepoint site, primarily the shared documents folder.
Is this the way I should go, ie creating a custom NewForm.aspx? Has anyone tried this as I seem to be getting nowhere.

Manoj Kumar Sriram said...

Hey Kristian Kalsing,

Thanks for sharing and a good one too...
I have an small issue, i.e.,
I got to transfer the data of one list item which is just created to another list item in another page.
how can i do this?
are there any events to do this?

mkscott said...

Kristian -- brilliant! And to Theresa, who commented above about making a simple content type for the newform, and then converting it to the original content type with a workflow -- also bloody brilliant! Works beautifully. Many thanks to you both.

Wim de Smit said...

Hi Kristian,

When customizing the page EditForm like you showed I want to add fields like Date created etc., but these fields aren't in the fields list anymore.
Question: how can I place fields like Date created, Created by etc. on my page?

Thanks in advance!

Nickiler said...

A solution for attachments on customised forms. http://weblogs.asp.net/sharadkumar/archive/2008/07/29/how-to-customize-sharepoint-forms-part-2.aspx

This plug-in allows for hiding and showing certain fields on a form as well as setting fields as read only right from the sharepoint list settings.

Anurag said...

I have create a list and added in NewForm.aspx also applied some validation and also able to add item in the list.

My Question is how do create the EditForm.aspx for this list with all the validation?????

Any help will be Appriciated....


SR said...

Please help! I accidentally deleted my original newform.aspx but managed to create a new one. The problem is everytime I select it as the New Item form in Supporting Files tab it doesn't get saved. I don't get an error message when I apply or click ok; when I come back to that screen, it's blank. Help!

SR said...

Sorry if this is a duplicate.

Can anyone tell me why everytime I try to change my "New item form" in Supporting Files tab, it doesn't get saved. I click Apply and Ok and there's no error yet when I get back to Properties, it's still blank. Yep, I managed to delete the old one. : ( Help please!!

Anonymous said...

Within the "Supporting Files" tab, there is a drop-down called "Content type specific forms:". It defaults to Folder -- change it to Item. This will fix your problem, sr.

Anonymous said...

Within the "Supporting Files" tab, there is a drop-down called "Content type specific forms:". It defaults to Folder -- change it to Item. This will fix your problem, sr.

Amie said...

SOLUTION TO “The page you have selected does not contain a reference to the correct SharePoint list.” when modifying forms in a Document Library.

In Designer open your ORIGINAL form (i.e. DocLib/Forms/EditForm.aspx) and save under a new name. Do not modify the original form.


In Code View…
In the ListFormWebPart find the ‘IsVisible’ tag and change the value from true to false.

In the WebPartZone but BEFORE the ListFormWebPart
Insert, SharePoint Controls, Custom List Form. Select the applicable Document Library, Content type and type of form. Click OK.

Customize your form and save it.

To implement your changes, in Designer locate the applicable Document Library folder (i.e. DocLib). Right click, Properties, Supporting Files, for the ‘New document form’ or ‘Edit document properties form’ (whichever is applicable), click Browse and select your new form, click OK.

You’re finished!

Amie said...

Sorry...I left one part out...
Change the ControlMode in the ListFormWebPart from edit or new (whichever is applicable) to display.

Anonymous said...

Can I have 2 different edit forms for different views for the same list?

Al said...

I didn't read this article first (I read the MS one) and apparently I went about this wrong in the beginning. I backed up my file, then deleted the old webpart and inserted the new custom form (like Amie says NOT to do). Now I can't the new form to stick in "Supporting Files", nor can I restore my backup (its pretty much empty -- old webpart is gone from the file).

Any suggestions on what to do here? All my "New" links now go nowhere (Invalid Page URL). :(

Anonymous said...

Sorry, its not possible to have a custom 'new' item form. Sharepoint have bugs in this area. Baaaaad!

Al said...

Hmm -- actually, I was successful before in creating a custom "new item" form, I just did it differently this time and messed it up. Good way -- create new aspx, insert custom form, point list to new page. This time I wanted to keep the same URL, so I deleted the old web part so I could insert the custom form on the old page. That was bad. :( Still can't associate the list to this page, so any suggestions still appreciated...

Anonymous said...

Hi Kristian

I have followed the instructions and everything is working just great.

The problem is, when I open up the DispForm and then go into Edit mode, the data from the DispForm disappears.

Any ideas?


Anonymous said...

Just a follow up on the advice about setting the appropriate "Supporting Files" property. (Nov 14, 05:22)

Great advice - I couldn't get it to work though, as every time I changed the NewItem source file in 'Supporting Files' and clicked Apply/OK then open Properties again, it reverted back to the old one.

I found that ensuring I selected 'Item' under the 'Content Type Specific Forms' dropdown, it worked.

I am new to this so not sure if that's what I'm supposed to do but it worked for me and may help other frustrated users!

Abhijeet said...


I need to add a another menu button on the document listing page.

How can I do it?

Please help me on this.

Kate said...

Thanks Kristian this article has saved me much time and hassle :-)

Chetan said...

I have a visitors group which has "read" permissions on a feedback list. Now I create a custom form say NewForm2.aspx and check it in. Users with "Read" access cannot send in a new feedback, which is correct! What would be a way to allow visitors to create a new feedback thru NewForm2.aspx, other than to give them "contribute" rights?

CaCmd said...

Hi Kristian,
I've spent the last few weeks reading up on custom lists, data views, CAML etc. and am still unsure as the best way of tackling my problem. On the home page of my intranet site I want to create a table with three columns,connection to 3 lists: one for Noticeboard items, one for alerts and one for New & Events. I can create seperate data views for each but what I really need to do is to add HTML design around them and put the 3 of them on the one table so I can add it as one webpart. I've been stuggling with this for ages so if you could just point me in the right direction...I have all the books to figure out

Scott said...

How would you do something like this custom form with the OOTB Calendar?

I get an error when I try to create a recurring event.

"An unexpected error has occurred.

Troubleshoot issues with Windows SharePoint Services."

Anonymous said...

So for the change of the SUPPORTED FILES thing, I just spent hours on it.

Good news is that I figured it out!!!!

First: whatever you do don't delete the orginal NewForm.aspx or EditForm.aspx Sharepoint uses these files to reroute to your custom form.

so for example you will first goto EditFrom.aspx and then get routed to CustomEditForm.aspx with the same ID= and Source= params. Hopefully, if you did DELETE it already it is still in your recycle bin on the Web UI.

You can either hide the existing one webpart and add a new custom list form, OR
you can create a new page with a custom list form.

The reason that when you set the list supporting items it doesn't work is because you don't have those original pages, also SP designer is buggy, right!

So in order to make sure this works you have to :

Close SPD
Open SPD
Navigate to your list.
Rightclick hit properties
Supporting files tab
there is a drop down change it to the second item ( the first item is Folder) gotta change it.
change to your custom pages. Hit OK.
( any other changes to the supporting files after this point will not save, in order to change it again you will have to close SPD, open it and navigate first thing to the list and change it )

wahla!!!! what a freakin mess, but finally got it to work!

Anonymous said...

I have found many blogs like this that recommend breaking the standard editforms and calling them custom forms, however what happens on hte nexr update of wss or moss that wipes out all your custom forms and replaces them with new ones. What I need is a truly custom edit form, "somethingeditform.aspx" for a task that needs using input before executing that won't be broken when sharepoint is updated. using client side scripts along with that is imperative. any suggestions as where I might find something such as that

Anonymous said...

Attachment Problem is Solved. Install SharePoint Designer 2007 Service pack2 (SP2)

Mehul Jamod said...

Hi Kristian,

Nice Article, I did manage to customize the list using custom list form but my requirement is to customize the list using code instead of using SPD. is that possible ? can u show me some examples if there ?
Many Thanks

Konstantin said...

Hi Kristian,

very nice post. It all worked. Do you know how to add new fields to the already customized form. I did create those in SharePoint, but can't figure how to add to the custom form.

btw: I was in Brisbane last year, you probably know this already, but you DO currently live in paradise. Lucky you ;-)

Kristian Kalsing said...


I'm not aware of a way you can add new fields to a custom list form through the UI. However, if you switch to 'Code' view you can copy and paste and existing row, change the field name (in multiple places) and replace the unique ids.

Emmo said...

Here's how to solve the attachment problem:


I skippped Step 1 (installation of hotfix). Just applied step 2. It worked fine for me!

Fran├žois said...

Post very complete with a lot of tips&tricks very useful! Thanks.

I had a question on form field display: i didn't found how to remove label Filed and keep only Field Value?

For example in Title form field, Title Label is displayed, then title value and title description.

Do you know how hide Title Label?

Thanks for your help!


Kristian Kalsing said...


Once you have inserted a 'Custom List Form' to replace the default 'List Form' you should be able to delete/edit the individual field labels.


n2mfc said...

This post was timely for me. I attempted creating custom, new, edit, and display forms using this method but the edit and new forms give me the error:

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.

The forms look great in SPD but don't work on the site. The display form does not work 100%. One of the fields I added is not displayed at all. I have not been working with SharePoint long so much of this is not intuitive.

I should note that I am attempting to customize the Microsoft "Lending Library" template.


Anonymous said...

You should never delete custom list form or you are in for one giant mess and many errors.

To customize a site as a best practice to avoid any issues:
When create a custom list form, we recommend to people not to delete the default form page, just replace them with new pages, or you can edit in the default form, the following steps can help you:

1. Open your site in SharePoint Designer, browse to the List and open the ‘NewForm.aspx’ web form.

2. Right-click the list form and select “Web part properties”, in the Layout section, select “Hidden”. (We should hide the original form and then create a new list form)

3. Go Insert > SharePoint Controls > Custom List Form.

4. In the List or Document Library Form dialog, select the List, content type and type of form (select display item form).

5. Click OK and a new form is added with controls representing all the fields from the list.

Anonymous said...

For those with attach file button and New button errors follow these instructions:

1. Insert your Custom List Form
2. Copy the _WebPartId from the original control
3. Replace the _WebPartId in your Custom control with the one in your clipboard
4. Copy the "g_...._..." ID from the orginal control
5. Paste it in the ID field of the Custom control

You can now delete the original control. (Or paste it into a text file just in case.)

Anonymous said...

Thanks Kristian,
very very useful.
Also if you have a second i have a a question.
After modifying forms edit, new, display with new field edit and new work perfectly bu field on display does not show the value. CorpGoal shows as 12 field in the list.

Any ide why? Please see snippet attached.
tr> <
td width="190px" valign="top" class="ms-formlabel">
H3 class="ms-standardheader"
nobr>Corp. Goal<
span class="ms-formvalidation"
> *<
td width="400px" valign="top" class="ms-formbody">
SharePoint:FormField runat="server" id="ff12{$Pos}" ControlMode="New" FieldName="CorpGoal" __designer:bind="{ddwrt:DataBind('i',concat('ff12',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@CorpGoal')}"/>
SharePoint:FieldDescription runat="server" id="ff12description{$Pos}" FieldName="CorpGoal" ControlMode="New"/>

Tony said...

Hi. I have a problem with the last step where the new customized form is attached to the list in List Propertis-Supporting Files tab under New Item form text box. I used browse function to associate NewForm3.aspx and clicked apply-OK.

But upon opening, the origional NewForm.aspx still shows. I have Full permissions and Site Collection permissions and I tried deleting origional form and renaming my custom form to NewForm.aspx but that does not work either (it just shows a blank text box and doesn't see the custom form). Help, suggestions? Thank You!

katty said...

This blog is really useful, actually i was looking for something different like a guide and i think a reached now in this blog. Honestly after to read this blog, i have too much knowledge than before. thanks.

buy viagra

tripwire said...

Has anyone noticed that Anonymous users are unable to publish custom list forms - irrespective of the permissions you apply?

I'm assuming it has something to do with the fact that Custom List Forms use a DataViewWebpart which may be calling a method that requires authentication?

Anonymous said...

Hello, nice post!
I have a problem with custom forms ... i have a date field (DateTimeControl) in the form; if a mistake in another input field triggers the validation, the mistake is corrected but the date field is not changed, sharepoint sets the date field to the current date.

This behaviour is quite dangerous...
Does anyone know this problem?

Short-Term said...

Kristian, you said,

1. Open the site in SharePoint Designer.
2. Right click the list in the Folder List and select Properties.
3. Go to the Supporting Files tab.
4. Use the Browse button to enter the path to your new Edit item form.

I have tried that repeatedly, but find that it does not save my changes to the New Form (actually, I renamed the original to "NewForm3" and the new one to "NewForm" - and despite changing the properties to point to "NewForm" it always reverts to "NewForm3, the original).


Kristian Kalsing said...


Which version of SharePoint are you using? This post was written for SharePoint 2007. It may have changed in 2010.

Short-Term said...

I am using Designer 2007 :(

rishi said...

Hi Kristian,

Can you provide me with some information as to how we can store the details of the pdf forms onto the sharepoint?



Karabo said...

Hi Kertian

Im having an issue with the alert on a custom list form not sending to some email addrress any idea what could be causing this?

Anna said...

Hi Kristian! Help me please?
How do I add my custom button to the form and add to it my custom code? Where can I write the code (C #)?

tripwire said...

Anna, just add it directly to the aspx page via SharePoint Designer.

What sort of custom action are you trying to provide? If it's beyond the powers of HTML/JavaScript then you will likely need to deploy this as a solution with codebehind.

That goes well beyond the scope of this article.

AvibaD said...

Sorry didint had time to read this post but I had a code taken from web which is simple and powerful without customization.
Just ad CWEP below your form and mention your column name in below field


The CODE is here: place it inside javascript

function DisableField(title)
for(var i = 0; i < document.all.length; i++)
var el = document.all[i];
// find html element with specified title
if(el.title == title)
el.disabled = true; // disable

Anonymous said...

Thank you for sharing your info. I really appreciate your efforts and I am waiting for your
further write ups thank you once again.

Here is my web page ... Raspberry Ketone

Steve Mendonzes said...

Beetroot Juice Health Advantages