from: Winsmarts.com
Creating a SharePoint list is hella easy. Point and click - and bingo - you have a form to type in and maintain your data in a structure you specified, and you can then create various views on the data collected.
But what if you wished to customize either the "New" form, or the "Update" form etc?
- Create an announcements list on your favorite sharepoint site.
- Open that site in SharePoint designer.
- Go to the announcements list on the left side in the treeview, find the "NewForm.aspx", right click on it, and choose "New from Existing page".
- Save that new page at the same level as NewForm.aspx, call it "NewForm2.aspx". (I am only doing this, so if you screw up NewForm2.aspx - you still have NewForm.aspx intact).
- Next, find the "PlaceHolderMain" webpartzone. Go ahead and default this WebPartZone to it's default content as shown below -
- Next, using a similar smart tag, do "Create Custom Content" for "PlaceHolderMain".
- Next, with PlaceHolderMain selected, go to Insert --> SharePoint Controls --> Custom List Form. You will see a dialogbox like this --
- You know what to do .. Click OK :).
- Great, now you should see SPD reflect the form as follows -
- Great, now I'm going to customize this form an WYSIWYG way, and knock off the "Expires". This is real easy frankly, just select the Expires Row, right click, Delete Rows - POOF!
- Save the NewForm2.aspx.
- Now, right click on the Announcements list in SPD, choose Properties, and go to Supporting Files, click on "Browse" under the "New Item Form", and choose "NewForm2.aspx".
- Hit OK.
- Go back to the browser, and add a new announcement, you should no longer see the "Expires" field as shown below -
Reference: Winsmarts.com (May 23, 2007). Customize the "NewForm.aspx" page for a SharePoint List. http://blah.winsmarts.com/2007-5-Customize_the_-and-quot;NewFormaspx-and-quot;_page_for_a_SharePoint_List.aspx
No comments:
Post a Comment