I am customizing the newform.aspx, and now when I try to add another text-box SharePoint field and try to change the type to form field, the form field option don't appear in the drop down box. I think I accidentally overridden or deleted a few tags. How can I restore the newform.aspx to its earlier version?
This link has step-by-step instructions to restore your newform.aspx. Open the broken form and another working form in SP Designer, remove the ListFormWebPart from the page, then copy the ListFormWebPart from the unbroken page. You also have to update the List GUIDs to make sure the web part is pointing to the correct list.
As an aside, in future you could create a new form (or copy newform.aspx) and then use SP designer to point the list to the new form. This would allow you to recover more easily.
The best options is as follows:
- Simply delete the bad ListFormWebPart form page if it still exists
- Make a copy of one of your good ListFormWebPart form page
- Rename the copied ListFormWebPart to whatever the name of the bad one was
This is the best options because it basically restores you back to the factory default OOB ListFormWebPart instead of creating DataFormWebParts, which have their pros and cons.