MSDN > 論壇首頁 > SharePoint - Design and Customization > Editing NewForm.aspx page
發問發問
 

已答覆Editing NewForm.aspx page

  • Friday, 3 July, 2009 11:51Ric Bevan 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    If I were to edit a NewForm.aspx page on SharePoint will this reflect over the whole site? I am wanting to add a Content Editor WebPart to the page and want to make sure this will only be added to that specific page.

    Also, some NewForm.aspx pages are locked from editing, but I have seen a QueryString (PageView=Shared&ToolPaneView=2) that allows editing. Is this a bad idea? Why is it locked in the first place?

    Many thanks in advance.

解答

  • Friday, 3 July, 2009 20:03Natalya VoskresenskayaMVP使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    NewForm.aspx is per list, not one for the whole site.
    There are 2 types of pages in SharePoint:
    1) Web part pages - editable
    2) application pages - not editable
    NewForm.aspx is application page.
    I have described some of the challenges with editing this type of paes here
    http://spforsquirrels.blogspot.com/2008/03/tips-for-custom-editform-and-newform.html
    My STRONG recommendation is not to touch the original page.
    Create separate page and add new item form to it (SharePoint Designer), new item form should point to your list.
    Use this custom page to add all other webparts that you want.

    Stay away from breaking application pages.

所有回覆

  • Friday, 3 July, 2009 20:03Natalya VoskresenskayaMVP使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    NewForm.aspx is per list, not one for the whole site.
    There are 2 types of pages in SharePoint:
    1) Web part pages - editable
    2) application pages - not editable
    NewForm.aspx is application page.
    I have described some of the challenges with editing this type of paes here
    http://spforsquirrels.blogspot.com/2008/03/tips-for-custom-editform-and-newform.html
    My STRONG recommendation is not to touch the original page.
    Create separate page and add new item form to it (SharePoint Designer), new item form should point to your list.
    Use this custom page to add all other webparts that you want.

    Stay away from breaking application pages.

  • Monday, 6 July, 2009 13:16Manishrao Patil 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    Hi,

    NewForm.aspx, editform.aspx etc. are the pages created for every individual sharepoint list and libraries. These pages are created using some templates that are into 12 hive of the sharepoint server. Editing or modifying these pages will not affect the pages of any other list or library (since its individual copy).
    The approach that you adopted for editing the page is not at all bad (as such there is nothing called good bad approach unless and untill it causes you any trouble :)  )
    The usual way for editing such forms can be found by bit google:
    http://kalsing.blogspot.com/2006/11/create-custom-list-form-for-sharepoint.html
    http://mysharepointblog.com/post/2008/01/Create-a-custom-list-form-for-a-SharePoint-list.aspx
    http://devdreams.blogspot.com/2007/02/customizing-editformaspx-in-sharepoint.html

    Let me know your comments on this.


    Manish Patil http://patilmanishrao.wordpress.com Posting is provided "AS IS" with no warranties, and confers no rights.
  • Monday, 6 July, 2009 13:38Kyle Schaeffer 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    As others have said, each list has it's own copy of "NewForm.aspx" as well as other ASPX files for list views, edit forms, etc.  If you want to re-use your customized ASPX files throughout your site, the best option is to use list templates.  Any customizations you make to a list will be saved in a list template, which allows you to re-use those customizations elsewhere in your site collection.

    The caveat?  If you want to make any changes to your template, it won't affect any lists that have already been created.  Once a list has been created, it's a standalone instance of your template.

    Good luck.
    Kyle
  • Tuesday, 7 July, 2009 15:43Ric Bevan 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Thank you all very much for your answers! Is it possible to 'create a separate page and add a new form to it' without SharePoint Designer as I do not have the ability to use it with the SharePoint instillation I am working on. Thanks again to all.