Monday, November 06, 2006 11:40 AM Jan Tielens

Custom Edit Forms for SharePoint 2007 Lists

What a coincidence: last week a student asked a question that I couldn’t answer straight away and probably at the same time somebody posted a blog post solving the question! The question was how to customize the edit form that you get when you create or edit a list item in a SharePoint 2007 list (EditForm.aspx). In SharePoint 2003 you could do this trick by editing the page in FrontPage 2003, when your right clicked on the control on the page you could actually break the control into different controls. Optimistically I tried to do the same thing in the SharePoint Designer, although the right click menu didn’t show to option that I was looking for (there went my street credibility for that course :-) ). Kristian Kalsing explains it on this blog post how this works in the 2007 world:

  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.

Filed under: ,

Comments

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, November 09, 2006 9:48 AM by Lakky

Nice one...

We did the same for EditForm.aspx page. 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...

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, November 09, 2006 10:06 PM by Ishai Sagi

did you notice that you cant add web parts to a page with the editform or the newform? I write about it in my blog, including a workaround.

However, I wonder if the same problem exists with the changed forms. can you try?

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, November 10, 2006 4:02 PM by Peter Cuttriss

Hi Jan, great blogging.

I've had a crack at this previously and it seems to work fine for lists, however I've been running into an issue when I attempt to create a custom edit form for a document library.

After I create the editform and finish editing it, I then right click on the document library and attempt to assign my new edit form as the default edit form to use via the properties.

1. Right click the root document library folder and select properties

2. Go to the 'Supporting Files' tab

3. Click the browse button next to the 'Edit document properties form:' text box and browse to my newly created 'Edit' form.

4. Apply the change.

When I try to apply the change however it comes with the error: "The page you have selected does not contain a reference to the correct SharePoint list. Please select another page."

I have successfully created a number of new edit form's for other list types and assigned them as the default edit/view forms via the above method,  but always get the above error when attempting it for document libraries.  Has anyone found the same with document libraries?

Cheers

Pete

# re: Custom Edit Forms for SharePoint 2007 Lists

Saturday, November 11, 2006 6:05 PM by Varun Jain

When i followed the above steps, it gave me error

"Type 'Microsoft.SharePoint.SPFieldUrlValue' in Assembly 'Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' is not marked as serializable. "

I am using a hyperlink column inside my list.

# re: Custom Edit Forms for SharePoint 2007 Lists

Sunday, November 26, 2006 10:28 PM by Max Brassart

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

Max

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, November 27, 2006 4:52 PM by Rags

EXCELLENT ARTICLE.

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, November 27, 2006 8:09 PM by Diana

Hi,

When I followed the instructions to create the dataformwebpart, my attach file button no longer worked.

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?

Thanks

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, November 28, 2006 7:04 AM by Willy

Hi Jan!

I have the same problem as Pete: It works well with list, but not with document libraries.

After editing my own "Editform2.aspx" and when I'm trying to change the Form that the document library sholud use I get the following error:

"The page you have selected does not contain a reference to the correct SharePoint list. Please select another page."

Has anyone idea how to deply this issue with document libraries?

Thanks!

/Willy

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, November 28, 2006 11:06 AM by Rags

Hi,

I created the custom edit form as per requirement , but when i click "new" in allitems.aspx it gives error "Invalid page :)" ..Am not sure why is this happening.

rags

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, November 29, 2006 5:33 PM by Rags

Me too getting the same error " The Form was customized not working with attachment"

# re: Custom Edit Forms for SharePoint 2007 Lists

Sunday, December 10, 2006 4:32 AM by Disturbed

A better way (in my opinion) of doing this is by using the ListFieldIterator webcontrol (found in Microsoft.SharePoint.WebControls). Simply remove the ListFormWebPart on the page you want to customize (say EditForm.Aspx). Set the ControlMode property to Edit,Display or New, and it will render the fields accordingly.

You can also exclude certain fields, by setting the ExcludeFields property to #FIELDNAME1;#FIELDNAME2; ...

Took me a quite some time to figure this out (I even tried writing my own Iterator using Reflection) so I thought it might be worth sharing.

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, December 20, 2006 3:43 AM by Nicholas

Hi, everybody...

I am using the trial versions of SharePoint server and SharePoint Designer.

I have a custom list with 3 fields (two text, one date): Title (required), Customer (required) and EntryDate (optional).

Using the custom edit form, I confront a strange behavior. Whenever I try to edit a text field, if the date field is not blank, I get the following error:

"The data source control failed to execute the update command".

If the date field is blank, no problem occurs. If I edit a text field and the date field is not blank, in order to avoid the error I have to edit the date field with a different value. Of course, this is not acceptable.

Any ideas?

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, January 05, 2007 11:22 AM by Frank Chiang

I want to display all fields but only edit some fields and so I went to set the 'control mode' to 'display' for some fields and I found that this only works for text field but not for dropdown field or checkbox field. Any solutions?

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, January 10, 2007 5:36 PM by Gerdes

Disturbed,

Could you please explain in a little more detail how to use the ListFieldIterator webcontrol?  I don't quite understand how you implement that.

Also, did using the ListFieldIterator solve the error of "The Form was customized not working with attachment"?

Thanks.

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, January 12, 2007 6:51 AM by Manuel

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?

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, January 17, 2007 10:39 AM by Disturbed

Gerdes:

Well, ListFieldIterator is what ListFormWebPart uses to display the fieldcontrols of a content type. It will not show the toolbars usually shown by ListFormWebPart, however. If you need those and just want to customize the appearance of the form, you should edit the different templates found in \12\TEMPLATE\LAYOUTS.

Anyway, here's some basic code to get the ListfieldIterator working in a webpart. You could probably add declaratively to a page as well.

WebPart code(add reference to Microsoft.SharePoint and include 'using Microsoft.SharePoint.WebControls':

protected override void CreateChildControls(){

ListFieldIterator it = new ListFieldIterator();

it.ControlMode = SPControlMode.Edit //can also be New, or Display

//let's say we want to exclude the field "Title" in our form

it.ExcludeFields = string.Format("#{0};", "Title");

this.Controls.add(it);

}

Now, just add your webpart to a page of your choice (like EditForm.aspx, for example). The webpart will display all fields except "Title".

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, January 23, 2007 11:48 PM by Nick

I am running into the "The data source control failed to execute the update command" But with data views. I can insert, delete, and save an unchanged row; beut everytime I try to save an edited row it error. The only refrence I have found points to incorrect data type for the database (MS SQL Server 2000 sp4). Any thoughts?

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, February 01, 2007 1:37 PM by Aaron

This technique works great! However it breaks the upload attachment feature and throws the below error message.

"This form was customized not working with attachment"

Has anyone found a way around this or to evoke the attachement JavaScript?

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, February 08, 2007 1:12 AM by Prashant Gupta

Hii,

I want to make all fields of my sharepoint site read only without touching Sharepoint Designer or Front Page 2003.

The user should not be able to modify any of the fields from the editform.aspx

I know that we can do it by writing JS in editForm.aspx but i have a problem that i can use any sharepoint editor.

So is there any workaround for this.

Thanks, Prashant

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, February 08, 2007 1:12 AM by Prashant Gupta

Hii,

I want to make all fields of my sharepoint site read only without touching Sharepoint Designer or Front Page 2003.

The user should not be able to modify any of the fields from the editform.aspx

I know that we can do it by writing JS in editForm.aspx but i have a problem that i can use any sharepoint editor.

So is there any workaround for this.

Thanks, Prashant

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, February 12, 2007 10:22 AM by Jacob

Anyone solved the problem with attachments?

"This form was customized not working with attachment"

Regards, Jacob W.

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, February 19, 2007 3:57 PM by Murilo Rodrigues

Hi fellows!

I've managed to show the current attachments in the list item, with the following code:

<SharePoint:FormField runat="server" id="ff6{$Pos}" ControlMode="Edit" FieldName="Attachments" />

I've also digged into the HTML/JS of a non-custom list form, and figured out that why the "This form was customized not working with attachment" message is show.

In a non-custom form, the web-part has two sections:

<span id='part1'>

// Web part section

</span>

<span id='partAttachment'>

// Attachment section

</span>

When one clicks in the "Attach File" button, the javascript function hides "part1" and shows "partAttachment", or vice-versa.

I tried to copy part of the HTML code of a non-custom form into my custom form, with no sucess.

If anyone is willing to give a try, please, remember to post your findings!

Regars, Murilo

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, February 21, 2007 3:27 AM by Nita

Hi ,

I am having a lil problem with a webpart on SP07.

I have used a Page Viewer Webpart to display a classic ASP Page. I would like to change the behaviour of this WebPart when 'Edit' is clicked and 'Modify shared webpart' is selected. I would like it to display another ASP Page. Is this possible? Or else is it possible to add another option onto the drop down that comes when clicking on 'Edit' of the webpart?

Scratching my head.

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, February 27, 2007 2:56 PM by Bo George

Has anyone used the ListFieldIterator declaritively with a control mode of New or Edit?  The data does not successfully update for me when I do this.  Note I'm using FormFields for other list fields and those are successfully updating.

<SharePoint:ListFieldIterator ID="listFieldIterator" TemplateName="WideFieldListIterator" runat="server" ControlMode="New" ></SharePoint:ListFieldIterator>

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, February 28, 2007 2:30 AM by Mark

I don't know if it's a bug or something but my changes in the Supporting Files tab just won't get saved no matter what I do. I press OK: no go. Apply, OK: no go.

Any work around so that I can directly tell MOSS to use my custom pages?

# re: Custom Edit Forms for SharePoint 2007 Lists

Sunday, March 04, 2007 4:20 AM by Adam

Hi Jan,

Following on from other comments I have had success using control declaratively on custom list form - sample:

<SharePoint:ListFieldIterator ControlMode="Display" ExcludeFields="PublishingRollupImage;#Region Name" runat="server"/>

<ParameterBindings>

<ParameterBinding Name="ListID" Location="QueryString(ListId)" DefaultValue="{12345}"/>

</ParameterBindings>

</SharePoint:ListFieldIterator>

As yet I have not found out how to control the css etc of the rows, but for key fields I just use FormFields separately and format them. The ListFieldIterator control detects whether you have already put a FormField on the page, if so it does not display it again but you could also add to ExcludeFields list.

By default you do not need to pass the listid, it picks it up from context. A very useful control, if only it were documented and if only it showed up in Sharepoint Designer ! ...or at least mine doesn't show it in the toolbox...what other useful tools are out there?!

Cheers

Adam

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, March 06, 2007 9:20 AM by Evi Vanoost

Hi there,

I solved the issue with attachments. It's a bit of a drag and requires some thinking, because of the way it works with JavaScript.

This is the code you need for attachments to work:

<SharePoint:AttachmentUpload ControlMode="Edit" runat="server" ID="fileupload{$Pos}">

</SharePoint:AttachmentUpload>

<SharePoint:AttachmentsField ControlMode="Edit" FieldName="Attachments" runat="server" Visible="true"></SharePoint:AttachmentsField>

This will display the input field and the buttons as well as what you're trying to upload.

1) First make sure your field and test case works (Edit form) without the attachments.

2) What I did was put the attachments in a separate xsl template:

<xsl:template name="attachments">

<xsl:param name="Pos" />

<tr><td>

<SharePoint:AttachmentUpload ControlMode="Edit" runat="server" ID="fileupload{$Pos}"></SharePoint:AttachmentUpload>

<SharePoint:AttachmentsField ControlMode="Edit" FieldName="Attachments" runat="server" Visible="true"></SharePoint:AttachmentsField>

</td></tr>

</xsl:template>

and then changed the dvt_1 template:

<xsl:template name="dvt_1">

<xsl:variable name="dvt_StyleName">ListForm</xsl:variable>

<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>

<table border="0" width="100%" id="part1{$noop}">

<xsl:call-template name="dvt_1.body">

<xsl:with-param name="Rows" select="$Rows"/>

</xsl:call-template>

</table>

<table border="0" width="100%">

<xsl:call-template name="attachments">

<xsl:with-param name="Pos" select="concat('_', position())" />

</xsl:call-template>

</table>

</xsl:template>

A few things that are important to remember:

The JavaScript in SharePoint will look for  the objectid part1 in the final HTML and hide the object (display:hidden) and the objectid partattachment and display the object. The partAttachment objectid is automatically generated to the table when you introduce the SharePoint:AttachmentUpload code. The part1 however, you need to introduce yourself.

Now, if you don't want that anything hides, just put in an empty element somewhere with the id part1{$noop}, otherwise, just use my example for the dvt_1 template (it's neater). The $noop is to fool SharePoint Designer since it will introduce {generate-id()} after the id if you don't specify anything there (to guarantee unique identifiers or something, I don't know) and thus it would fail the javascript since it can't find id=part1, but there will be a part1KLV532.

You can specify the noop parameter to be empty in the beginning of your xsl stylesheet: <xsl:param name=noop></xsl:param>

If this is a little confusing or difficult to read, you can always go to my website: www.valerieandevi.be

Evi

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, March 08, 2007 9:36 AM by Ustes G

I cannot get my newform.aspx to show.  I completed the steps above to insert a custom list form.  I keep getting "Invalid page url:".  This is driving me crazy.  I have recreated a site trying to solve this.....

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, March 08, 2007 5:35 PM by Tom

Same thing here about the "Invalid page url:" error.

Only deleting the old list form and inserting the custom one (not modifying anything in it) is enough to trigger the message.

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, March 08, 2007 7:02 PM by Adam

Hi Ustes and Tom, it could be you have not set the custom form as the display page for the list:

- navigate to your list in sharepoint designer

- right click and choose properties

- go to the Supporting files tab

- choose the content type you want to display your list form for (eg custom list form = item)

- then browse to set the display page to be the one you've created

- save. Now your display page should be associated with items in your list.

Hope this helps! Cheers Adam

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, March 09, 2007 9:40 AM by Ustes G

Hi Adam,

I have done exactly what you said, and it will not save it.  Another thing, If I modify a list (add columns) and use the Custom List Form, I don't get the new columns...

Tom- My solution was to just modify the NewForm.aspx by adding the controls that I wanted.

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, March 09, 2007 9:47 AM by Ustes G

Correction..When I add a new ASPX page, follow the steps for inserting content and changing the forms that display...PRESTO!!!!!

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, March 09, 2007 10:11 AM by Kevin

Ran into a very potential very dangerous check with this.  We were re-customizing an existing events calendar form from SPS2003 to SPS2007 and ran into the same "invalid page url:" error after following the instructions.  In searching around the the web, we found a pretty good description and troubleshooting posting for that error from David Szabo here: http://blogs.msdn.com/dszabo/default.aspx

It looks for the most part that it completely breaks the web part if you replace the existing newform/editform/dispform.aspx with the new one(s) you created by renaming the edited one back to the original name (which we did).  

We learned the very hard way that you shouldn't do this.  We also learned that you cannot take 2003 web parts lists and import into 2007 so we ended up having to upgrade another instance of our old portal just to retrieve a clean copy of that events list webpart due to the amount of data contained in it.  

Instead, keep the renamed aspx pages as they are.  Then go to the properties of the list > Supporting Files Tab and repoint to the new aspx pages (for example repoint newform.aspx to newform2.aspx).  It works fine after that.

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, March 13, 2007 10:29 AM by SergR

Hey,

Is it possible to change Save button (<Sharepoint:SaveButton>) behaviour?

I need to open Edit Form in popup window (for related list management). After save I want to close popup and refresh parent page (using JS).

Have you any Ideas how to do this?

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, March 14, 2007 9:38 AM by MC

I was trying to add a custom list as mentioned here; however, kept getting an error when clicking "Save" with the insert command. After recreating a test list and adding the fields one by one, I realized that the error occurred when using a field (in my case a date field) with a formula for the default value. Removing the default formula removed the error.

My question now is, has anyone found a work around for this, and when adding a cutom new/edit form from the list data source and not using the Insert/SharePoint Controls/Custom List Form menu, the "Save" button saves, but doesn't return to the calling page (even with "Source" attribute set in the query string for the page). Can one override the OnCLick="BLOCKED SCRIPT {ddwrt:GenFireServerEvent('__commit')}" event somehow?

Hopefully this is clear enough,

Mark

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, March 15, 2007 6:08 AM by Mark

Here's a useful link when basic form customization isn't enough:

http://msdn2.microsoft.com/en-us/library/ms916819.aspx

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, March 19, 2007 11:55 AM by Tom

I just spent an hour getting frustrated that my site was not changing the EditForm to my custom version when I clicked save in the Supported items tab. Others here are complaining about the same thing. The solution is to make sure that you have selected the correct *content type* - it should be "item" if you only have one type.

Mine defaulted to folder in the drop-down, which ensures that Sharepoint Designer silently fails to make the change. Frustrating UI design, but a correct failure.

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, March 23, 2007 9:23 AM by Ian Sheldon

Hi,

Not sure if this is on the similar lines, but I have a display form and am struggling to view the attachments.

Any ideas?

Thanks

Ian

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, March 26, 2007 11:21 AM by Steve Wigren

I have written an event handler to validate a form during the ItemUpdating event.  If the user did something invalid, it cancels the update and displays the standard SharePoint error page with a customized message that tells the user specifically what they need to correct.  This works great with the default EditForm.aspx, but when I use a custom edit form on the same list a just get an error page with a generic message that says "The data source control failed to execute the update command".  It looks like my event handler is doing it's validation and cancelling the update ok, but SharePoint is simply detecting that the event was cancelled and supplying its own (useless) error message.  Does anyone know a way around this?

# re: Custom Edit Forms for SharePoint 2007 Lists

Saturday, March 31, 2007 6:25 PM by Nils

Thanks much for this information, its been very helpful.

A quick question: Anyone tried making multi-page forms for filling out an entry for a list?

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, April 10, 2007 4:14 AM by David

Answer to Max Brassart re filtered lookups. You need to use SharePoint Designer to create a new datasource (with the filter you need), then add a SharePoint dropdown list to the page which is bound to the new datasource that you have created.

More details on my blog: http://dattard.blogspot.com/2007/04/sharepoint-2007-filtered-lookups.html

# re: Custom Edit Forms for SharePoint 2007 Lists

Saturday, April 14, 2007 3:28 AM by Anonymous

In the NewForm.aspx file locate the following:

<WebPartPages:DataFormWebPart runat="server" IsIncluded="True" FrameType="None" NoDefaultStyle="TRUE" ViewFlag="0" Title="Project Request (Production Team)" __markuptype="vsattributemarkup" __WebPartId="{42949044-3270-485B-9F55-304E0F66C99D}" id="g_42949044_3270_485b_9f55_304e0f66c99d" __AllowXSLTEditing="true" WebPart="true" Height="" Width="" partorder="1">

and add this tag directly after this tag:

<span id="part1">

  <SharePoint:AttachmentsField ControlMode="new" FieldName="Attachments" runat="server" Visible="true"/>

find the following tag:

</WebPartPages:DataFormWebPart>

and before it add the following tag:

</span>

All the other unmodified forms should work, solution has not been tested on modified Edit or Display forms.

# re: Custom Edit Forms for SharePoint 2007 Lists

Saturday, April 14, 2007 9:07 AM by Andreas

Hey Anonymous,

that doesn't work at all, pls be bit more specific :-D

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, April 17, 2007 1:43 PM by John Granade

Great article.  It got me past a problem so I blogged on the solution myself. :)  I was having the same problem Peter Cuttriss and others had where the 'List Preperties' settings wouldn't really save even though they didn't give an error.  On a hunch,  I changed the "Content type specific forms" setting from 'Folder' to 'Item' and saved.  Then everything saved and it's all working great now.  Thanks for posting!

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, April 19, 2007 6:23 PM by Chris

I've tried both of the solutions that are on here to try and fix the attachment issue on the NewForm.aspx page.  Has anyone gotten the attachment buttons to work?

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, May 02, 2007 10:08 AM by Mike D

HELP!  When I attempt to enter a custom list form, nothing happens.  I have tried the steps above, tutorials from Microsoft, etc.  I create a new page, go to Sharepoint Controls, insert cutom list form, choose the default for the Annoucement lists, and NOTHING HAPPENS.  Zip, zilchm, nada.

ANy thoughts?

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, May 03, 2007 4:21 PM by Mick

Mike D, I had tried this months ago and didn't seem to have any problems.  I now just tried to do it again on a new site as well as on the site I had done this on before and I also can't get it to work anymore.  I select the list, content type, and form type, click OK and nothing happens.

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, May 07, 2007 12:08 PM by Mick

Mike D, it must have been some patch from MS.  I uninstalled Sharepoint Designer and re-installed and it is now working again.

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, May 11, 2007 11:59 AM by bhaskar

I have created a web user control and trying to add it in a webpage in sharepoint website.

i have made all the necessary changes in web.config, registered it in aspx page,signed it and placed it in GAC  but still get the error.

I get an error "An error occurred during the processing of /TestPage.aspx. The referenced file '/MyControl.ascx' is not allowed on this page.

Can anybody please let me know any specific reason and mitigation for it

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, May 17, 2007 7:03 AM by TT

Please display solution to make one column read only for specific users,depending on their user level

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, May 21, 2007 8:34 AM by Stelios

Sorry :(

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, May 21, 2007 11:40 AM by Kris

Cool.

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, May 21, 2007 4:40 PM by chris

Good info ... what if when I add the custom list form and it seems like nothing happens? I can remove existing webpart and then add but no activity seems to take place. Am I missing something or not have the right version to do this.

Thanks!!

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, May 22, 2007 1:26 PM by Kypros

Nice...

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, May 24, 2007 12:46 PM by Kathy

I am trying to include ID from the list view on the Edit form but it isn't there when I insert the Custom List Form. Any ideas how I can add ID to the Edit form?

Thanks.

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, May 24, 2007 1:49 PM by Kathy

Of course I am just wanting to display it - not change it. Thanks.

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, May 25, 2007 3:08 PM by Matrixneo42

I also experience the "nothing happens" bug when I try to insert a custom list form.  Is there windows update available for this?  I am doing windows updates now but I didn't see any patch for Sharepoint Designer.  I am usinng the trial, does that matter?

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, May 29, 2007 9:52 AM by Pablo N.

The Custom List Form solution es great whenever you don't use attachments or program any item event.

Attachment solution referenced by Evi doesn't work. Looks like some JavaScript code is missing.

Any time you have a "properties.Cancel = true;" in an ItemUpdating (SPItemEventReceiver) you get an "The data source control failed to execute the update command", the same said by Steve Wigren.

Finally, ListItemIterator solution looks cool but you loose the toolbar. :(

Any one got a full working solution?

Thanks!

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, June 06, 2007 5:29 AM by Adamantios

Nice...

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, June 21, 2007 2:43 AM by Sowmya

Hi,

In Custom Form the solution given by Evi does not seem to be working. Anybody had success in solving the attachment problem? If so please tell the solution

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, June 22, 2007 3:30 AM by Nicky

Hi,

Anyone fixed the 'Nothing happens' bug when you try and add a custom list form? Im desperate to use this and have searched MS site for updates but no joy.

Thanks

# Robot Minds of Robot Slaves &raquo; Back To Sharepoint Designer

Pingback from  Robot Minds of Robot Slaves  &raquo; Back To Sharepoint Designer

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, June 25, 2007 6:02 PM by areyngoudt

same here...  anyone solve the attachment saving issue?

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, July 03, 2007 12:41 PM by Kamesh

Hi All,

I Updated my EditForm.aspx sucessfully.  We can easily do it, u can place heading for different list items, and also u can insert some extra button and anything.  Given below is the URL from that u can easily create a custom form for create a new item and edit a item.  But make sure that don't delete your bydefault (NewForm.aspx, EditForm.aspx etc.), bcoz if u deleted then u will face the error Invalid page URL msg.  Bcoz if u delete the bydefault page then ur custom page is not able to find ur list webparts. U can give any name to ur custom page and u can use it by setting the name in your list folder properties.  Check this--

weblogs.asp.net/jan/archive/2006/11/06/Custom-Edit-Forms-for-SharePoint-2007-Lists.aspx - 93k

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, July 11, 2007 3:22 PM by BC

Very frustrating that customising the simple newform.aspx, editform.aspx changes to display the way we want is so ambiguious,confusing,flaky. I hope MS is watching this and gives a single solution.

This is what I figured out so far.

You can change the layout of the newform,editform pages but you will lose the attach file functionaly.I have not able to  succesfully be able get the attach file functionality work with a custom layout.

The key is not to delete the existing webpart but to hide it.

# re: Custom Edit Forms for SharePoint 2007 Lists

Sunday, July 15, 2007 12:52 PM by Steve

Lot's of questions, no answers.

Jan, unfortunately you seem to not take part in the discussion.  May I ask why?

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, July 19, 2007 2:04 AM by Arjun

Hi All,

I created one customlist ,and i created one KPI on that list its working fine.Now i want to  create another list which should be dependent on my old list.and whatever modificatoin i do on my old  list  that should reflect onto my new list. i want create new KPI  on Newlist. Please mail me on  Email:arjun.arigela@gmail.com  

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, July 27, 2007 11:40 AM by Chuck

Hi All,

I am using content types in share point list. When I create new entry, First i select content type and create it. But, when I edit then it shows Content Types drop down box on top of the page. Is there any way to disable or hide or remove it.

Appreciate your help.

Thanks

Chuck

# Robin's Sharepoint Blog: This form was customized not working with attachment

Pingback from  Robin's Sharepoint Blog: This form was customized not working with attachment

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, August 08, 2007 4:07 PM by Scott

I followed this to edit a form but found it easier to create a new form but went into  sharepoint controls so that it new what list I was creating a form for and everything shows up. The list has a custom column that is a drop down. For some reason when I use this form it doesn't save any selection that I had in the drop down but the field is also not a required field. All code appears correct. What should I check for?

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, August 15, 2007 5:40 PM by sameer

I want to add code to the SaveButton on the editform.aspx. How do i do that?

Sameer.

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, August 16, 2007 11:04 AM by achyutpsd

Hi Jan

I need a different solution similar to your blog. I have all the list fields in my custom list page and in addition to that i have added two more text boxes. Those addtional control info is should be saved in different list. Guide me how to achieve this

Thanks

Achyut

# re: Custom Edit Forms for SharePoint 2007 Lists

Saturday, August 18, 2007 9:33 AM by Rizwan Ansari

All those who a are getting the error :"The page you have selected does not contain a reference to the correct SharePoint list. Please select another page." should refer to this post ->

forums.microsoft.com/.../ShowPost.aspx

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, August 20, 2007 5:48 AM by Kishore

Hi friends,

               Had anybody broke through "AttachFile" problem in customized list.Help me if anybody did.

               Have  a nice day.Thanks.

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, August 30, 2007 1:48 PM by Craig Schaefer

I have a somewhat related topic, and I was hoping someone could direct me to a solution.  

I have two lists, a Project list and Document Libary.  I would like to "attach" documents to my project items, by creating folders for each project item in the Document Library, and putting relavant documents into the appropriate folders.  

To do this, I need to modify the Save event on the NewForm.aspx page so that upon inserting the new item, it creates the appropriate folder in the Document library (ie. a folder with a name containing the ID of the Project).

Does anyone know how to do such a thing?

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, August 30, 2007 2:01 PM by AutoSponge

This was so helpful, thanks for being!

# re: Custom Edit Forms for SharePoint 2007 Lists

Saturday, September 01, 2007 4:28 AM by FJ

Evi suggestion is not saving the Attach File to the List

FJ

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, September 10, 2007 9:14 AM by Chinnu

Cant' move focus to the control because it is invisible, not enabled or of a type that does not accept the foucs

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, September 10, 2007 9:23 AM by G

when clicking on Attachfile button its getting error :

" Cant' move focus to the control because it is invisible, not enabled or of a type that does not accept the foucs"

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, September 12, 2007 11:38 AM by Jerry

is there any way to make the Body field (a list form field) expandable? It is too squished and we want to widen it out. How would I go about doing this?

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, September 17, 2007 1:30 PM by K

I can create the new custom form, but when I try and create the edit form, it does not have my drop down custom fields from the new custom form. It seems to be reading the original new form.

Any suggestions?

# Products

Saturday, September 22, 2007 1:35 AM by Products

When you totally embrace this, you\'ll be able to work more readily.

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, September 27, 2007 3:30 AM by Ahshad Jussawalla

Solved the problem for displaying attachments in a custom display form.

Simply add a new row in the custom display form and add the following line within that row in the code view.

<SharePoint:AttachmentsField ControlMode="Display" FieldName="Attachments" runat="server" Visible="true"/>

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, September 27, 2007 1:56 PM by Joe

What is the best way to validate these forms.

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, October 08, 2007 10:16 AM by Anonymous

Hi Ahshad,

Attachments are not saving to the list.

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, October 16, 2007 1:45 AM by Sanjay Munjal

Hi Craig Schaefer,

I am also trying to do the same. Having a custom list "Projects" and document library "Project Documents". I was able to create the folder on ItemAdded event using custom event receiver. Also used the ItemUpdated to check in case project was renamed, then moved the folder.

What I am struggling is to have various custom form for various project stages to certain fields (from whole list of fields for a project). For e.g. when a project has "planning" status, I don't want to show certain fields which may be required when it is being "executed" status. Did you attempted something like this? If you, then can you share your solution?

Thanks.

Regards.

# re: Custom Edit Forms for SharePoint 2007 Lists

Tuesday, October 16, 2007 3:02 AM by Kishore

Hi,

  Iam not able to save attachments to customised Newform.If anybody have a solution please help me.....

              Have  a nice day......

# Mostrar campos ocultos en el formulario DispForm.aspx

Friday, October 19, 2007 7:32 PM by Blog del CIIN

Muy buenas, uno de los problemas que me he encontrado en el proyecto en el que me encuentro trabajando

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, November 16, 2007 10:17 AM by Bob Klass

With all the trials and tribulations posted here I am surprised I am the only one with this problem:

I created new create, edit and display forms for a calendar list (I didn't shoot myself in the foot and delete the old ones - that's a bad idea, isn't it). This was so I could hide the row with "create workspace" in it.

The create form seems to work fine, but the the edit and display forms always show the first record in the list.

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, November 16, 2007 2:07 PM by PC

I'm having the same problem as Jerry. Any help would be appricated. I was able to expand single and multiple text field by modifiying the core.css. Also is there any way to increase the size of the area that displays the field descriptions?

-----

is there any way to make the Body field (a list form field) expandable? It is too squished and we want to widen it out. How would I go about doing this?

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, November 16, 2007 2:07 PM by PC

I'm having the same problem as Jerry. Any help would be appricated. I was able to expand single and multiple text field by modifiying the core.css. Also is there any way to increase the size of the area that displays the field descriptions?

-----

is there any way to make the Body field (a list form field) expandable? It is too squished and we want to widen it out. How would I go about doing this?

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, November 16, 2007 5:49 PM by PC

I am having the same problem as Jerry. I would like to increase the size of the boxes, 143x129 is not cutting it. I was able to increase the display size of single and multiple line text boxes by modifying the core.css file.

-----------------------------

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, September 12, 2007 11:38 AM by Jerry

is there any way to make the Body field (a list form field) expandable? It is too squished and we want to widen it out. How would I go about doing this?

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, November 19, 2007 3:31 PM by Jennifer

This was a great article, and I've been trying to use it on my Survey, but every time I customize that web part, I completely lose all of the branching logic that was built in. Has anyone tried this approach with a survey that has branching?

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, December 06, 2007 10:36 AM by Jigar

I have document library. When I upload any document and enter metadata and press check in button. it redirects me to AllItem.aspx page of that library.  Is there any way to get redirected on differant or any new custom page insted when checkIn button is pressed?

# re: Custom Edit Forms for SharePoint 2007 Lists

Wednesday, December 12, 2007 10:05 PM by Richard Martins

Using SharePoint Portal Designer I have copied NewForm to MyNewForm and then updated the MyNewForm.

I then went to the properties of the list in Sharepoint Designer, Supporting Files tab and changed The New Item Form to MyNewForm.

When I browse to the list and click New i get a alert box stating "Invalid Page URL:"

Any help will be appreciated

Richard Martins

richard.martins@wanews.com.au

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, December 14, 2007 6:05 AM by Sipi

Hi there,

is there any way to replace the asp and SharePoint controls (for example asp:TextBox or SharePoint:DVDropDownList) with custom user controls?

If i register my control in the aspx page, and i place in into xsl block, i always get the "Unknown server tag" error message. asp prefix has the xmlns:asp="schemas.microsoft.com/.../20", and SharePoint has a xmlns:SharePoint="Microsoft.SharePoint.WebControls"  declaration. But how can I use my user controls in xsl block?

Greetings: Sipi

# re: Custom Edit Forms for SharePoint 2007 Lists

Thursday, December 20, 2007 9:38 AM by Lp12

Hi Jan,

Can you please elaborate how to do this in WSS 2 with FP 2003?

Thanks a lot in advance

# re: Custom Edit Forms for SharePoint 2007 Lists

Monday, December 31, 2007 10:37 AM by Jerry T

Has anybody found a solution for the "nothing happens" issue when inserting a custom list form?  I see quite a few posts on a number of blogs by people hitting this wall, but no solutions.

I have tried re-installing, upgrading from a trial version, etc. but still nothing.

Does anonymous access need to be set up (similiar to the XML web part issue)?

Seems like this should "just work" and I am not alone in having this problem.

Thanks in advance!

# re: Custom Edit Forms for SharePoint 2007 Lists

Friday, January 11, 2008 2:07 PM by another sharepoint guy

I love you.

I love you with all my heart.

# How to customize rendering of SharePoint list form fields - Part 1

Monday, July 07, 2008 12:03 AM by Sharad Kumar

While SharePoint offers great flexibility to users for quickly creating custom lists in various forms

# Survey pulling in URL Querystring Data with Hidden Fields(!!), Anonymous Access.

Monday, March 02, 2009 4:16 PM by SharePoint 1970

This is a bit like &quot;Part II&quot; to my original post [ www.sharepointblogs.com/ggill1970

# Surianee.com &raquo; Creating a custom list form from a list library

Pingback from  Surianee.com  &raquo; Creating a custom list form from a list library