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.
Share this post: Email it! | bookmark it! | digg it! | reddit!