locked
How do you add a field to a custom list form? RRS feed

  • Question

  • Hi,

     

    I have a custom list form that is showing fields from a list. When it was made some fields were deleted that need to be readded - how do you add a field to the form that is on the list?

     Using WSS v3

    Thanks,

     

    Thursday, July 29, 2010 11:04 AM

Answers

  • Hi All,

    I found the answer via Google:

    http://www.sharepointblog.com/2010/01/adding-columns-to-custom-list-form-in.html

    NB - this is not my blog...

    Adding Columns to a Custom List Form in SharePoint Designer


    The easiest route is to start by copying the code for a similar field and change the variable names to match the name of your new column.
    The id number will likely start with ff and need to be unique, one greater than the current highest number. The id number appears again in the designer:bind section and the FieldDescription id. It must match in all three spots.
    The column name appears in the FieldName fields and the designer:bind section. Spaces in the column name are represented by _x0020_
    Verify that the field name is in the <datafields> section in the top of the web part code, just above the XSL. If not add it follow the format of the existing fields.

    Another option would be to delete the Custom List Form and create a new one. Assuming you've modified the Custom List Form you would need to recreate any modifications, but if they are minor that might not be difficult.

    A third option would be a combo of the two above options. First make a copy of the page that the Custom List Form appears on. On that copy delete the Custom List Form and then add it back. Go into the code, copy the code you need, and paste it into the Custom List Form on the original page. When you are finished delete the copy.

    :)

    • Marked as answer by GuYuming Friday, July 30, 2010 3:16 AM
    Thursday, July 29, 2010 1:00 PM

All replies

  • Hi All,

    I found the answer via Google:

    http://www.sharepointblog.com/2010/01/adding-columns-to-custom-list-form-in.html

    NB - this is not my blog...

    Adding Columns to a Custom List Form in SharePoint Designer


    The easiest route is to start by copying the code for a similar field and change the variable names to match the name of your new column.
    The id number will likely start with ff and need to be unique, one greater than the current highest number. The id number appears again in the designer:bind section and the FieldDescription id. It must match in all three spots.
    The column name appears in the FieldName fields and the designer:bind section. Spaces in the column name are represented by _x0020_
    Verify that the field name is in the <datafields> section in the top of the web part code, just above the XSL. If not add it follow the format of the existing fields.

    Another option would be to delete the Custom List Form and create a new one. Assuming you've modified the Custom List Form you would need to recreate any modifications, but if they are minor that might not be difficult.

    A third option would be a combo of the two above options. First make a copy of the page that the Custom List Form appears on. On that copy delete the Custom List Form and then add it back. Go into the code, copy the code you need, and paste it into the Custom List Form on the original page. When you are finished delete the copy.

    :)

    • Marked as answer by GuYuming Friday, July 30, 2010 3:16 AM
    Thursday, July 29, 2010 1:00 PM
  • You need to use SharePoint Designer to modify the existing form.  A complete step-by-step article from Microsoft is available at the link below:

    http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-custom-list-form-HA010119111.aspx

    Be sure to only modify a copy of the original form whenever possible!  The article will guide you through the process.

    I hope that helps!

     


    Tom Molskow SharePoint Architect
    • Proposed as answer by Tom Molskow Thursday, July 29, 2010 1:10 PM
    • Marked as answer by GuYuming Friday, July 30, 2010 3:17 AM
    • Unmarked as answer by xyz2012 Monday, August 2, 2010 8:19 AM
    Thursday, July 29, 2010 1:10 PM