How do you create a new copy of NewForm.aspx in SharePoint Designer 2010. I would like to the customize the copy. I tried to copy the source code from the original to a new New Item Form, but that seemed to erase the original. Or, is there is a way for me to add fields to the New Item Form. Thank you.
-
It is wise to fiddle with a copy of the form, good for you. But if you break it, don't panic. Copying the code from another list's form and substituting a few GUIDs sould help you out in that case. Just ask another question if that happens.– Alexey KrasheninnikovCommented Jul 19, 2010 at 18:49
3 Answers
Alternatively you could use the browsing mode of SharePoint Designer and, at your preference, copy/paste or Ctrl+drag the NewForm.aspx file within the list's (or document library's) root (or Forms) folder. Then you could rename the files and in the list's properties choose the default item creation form as well as item display and item edit forms.
Open the file and then save it under a new name.
-
I have one more question please. Where do I save it to so that it will show up as an option under the appropriate list? Thank you.– AnonymousCommented Jul 19, 2010 at 17:43
-
Using this approach, the Save As dialog should default to the appropriate location. You may then want to use the Forms list on the right side of the list properties page to set your default New form. Commented Jul 19, 2010 at 19:01
My personal preference is to create a new form from scratch -- leaving the original intact. To do this, browse to your list in SharePoint Designer 2010, then click on "New" in the Forms list on the right. It will ask you if this new form is for "New", "Display", or "Edit" and allow you to set the default form for each action.
A little additional info here. If you want to customize the form (e.g. hide certain fields or change the order of the fields), I believe it is much easier to do that using a Data View Web Part on your New page or or a custom "Site Page."
-
Sometimes it's better to ask server or site admin to tune the fields and content types. Standard forms contain helpful html comments that might be of use when adding new client-side functionality using javascript. Those are lost when you use DataForm or DataView. Commented Jul 19, 2010 at 19:47
-
True, but since the poster asked if there was a way "to add fields to the New Item Form", I assumed he was needing something a little more than manipulating fields with jQuery. I'm a big fan of jQuery on SharePoint pages, but there are definitely situations where a custom Site Page with a DVWP makes more sense. Commented Jul 19, 2010 at 23:22