How to edit custom newform.aspx? RRS feed

  • Question

  • Hi,

    Basically I'm new in sharepoint. I believe this is a common question but i didin't manage to find a solution suitable for me.

    I want to edit the form for adding new items to the list. When i click on edit form in sharepoint designer 2010 I get this code:

    <WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{0BB26BD1-11EA-4326-AFC0-FA5C28915091}" >
    <WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
      <Description />
      <Height />
      <Width />
      <DetailLink />
      <HelpLink />
      <PartImageSmall />
      <PartImageLarge />
      <IsIncludedFilter />
      <ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{F7CD289E-B836-440C-9AAE-1DBD783CD235}</ListName>
      <ListId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">f7cd289e-b836-440c-9aae-1dbd783cd235</ListId>
      <PageType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">PAGE_NEWFORM</PageType>
      <FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">8</FormType>
      <ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">New</ControlMode>
      <ViewFlag xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">1048576</ViewFlag>
      <ViewFlags xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">Default</ViewFlags>
      <ListItemId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">0</ListItemId>
      <TemplateName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">ListForm</TemplateName>

    The actual form looks much more different in the browser:

    How can I delve to the form to be able to edit it?

    Sorry for my English, thanks in advance.

    Tuesday, September 18, 2012 8:11 AM

All replies

  • You can edit form using infopath .

    Click on Customize Form and edit form.

    Navneet Singh

    Tuesday, September 18, 2012 5:57 PM
  • The form you're viewing is the default new form for all the sharepoint list.

    Try not to Customize the form by using the SPD ,you can create the site column by using the VS 2010 (SP Solution)


    <Field Required="FALSE" ID="{E736576D-9A28-4A5F-8895-4FD8F5F87656}" Type="Choice" DisplayName="Status" Name="Status" Format="Dropdown"  StaticName="Status" ShowInNewForm="FALSE" ShowInEditForm="TRUE" ShowInViewForms="TRUE">

    To Create a New Form in SPD

    Wednesday, September 19, 2012 3:17 AM
  • Is it possible to create new form based on the default one?  There are lookupfields  in the default newform page which gets information from another list. I can't find where this was done.. Also datepicker automaticaly sets date to today, even if I enter another value. Workflows seems nothing to do with this.

    I also can't edit form in infopath because I have SP Foundation which (I think) isn't compatible with this feature.

    Wednesday, September 19, 2012 5:34 AM
  • Your best bet is to leave the NewForm.aspx alone, but make a copy of it that you can tinker with. You can right-click on NewForm.aspx in the Folder List in SharePoint Designer and copy it, then right click on the list name and choose "Paste" to create a copy.

    When you're ready to make your list actually use your modified form instead of the default NewForm.aspx, right-click on your list title and choose "Properties." In the "Supporting Files" tab you can specify which .aspx files to use for the New, Edit, and Display forms for each content type in the list. (It's important to know which content type you're adjusting... you'll be very frustrated if you try to change the forms for the Folder content type!)

    Now with that out of the way, the thing that appears in SharePoint designer as "Column Name 1, Column Name 2, Column Name 3" and so on is just a placeholder. It represents a List Form Web Part. What the List Form Web Part does is decide what types of field controls it will show to the user based on what types of columns are on the list. This is nice because it lets you add new columns to the list without having to manually edit the form, but it can be frustrating because the web part has taken over the responsbility of actually displaying each field; it doesn't let you change them around.

    If you decide you need something beyond what the List Form Web Part does, you can create your own form where you manually specify all of the controls to display.

    So on your copied new form (not on the original, if you can help it), you can go ahead and delete the list form web part. Now choose Insert -> SharePoint Controls -> Custom List Form. Choose the list, choose the content type, and choose "New" (instead of "Edit or "Display") and click OK. Looks better already, doesn't it? You can now tweak each field control to your heart's content. But with great power comes great responsibility, yada yada yada, so you'll have to manually update this form in SPD whenever you want to change it... you've been warned!

    Let me know if that helps you out, or if anything I've said needs further clarification.

    This response assumes you have SharePoint 2007 WSS, but the steps should be similar for SharePoint Foundation 2010, even if the exact steps and menu items are different.

    • Edited by thriggle Wednesday, September 19, 2012 9:54 PM
    Wednesday, September 19, 2012 9:53 PM
  • Thriggle,

    I was asked to make a mod to a Sharepoint Wss 3.0.  I know... what year is year?  ;)

    Thank you for you great reply...7 years later.  

    It was exactly what I needed to remind me what to do to change out the newForm.aspx.


    Friday, February 28, 2020 7:13 PM