I built a custom new form for a page and in the schema file I did the following:
<Form Type="NewForm" Url="NewForm.aspx" WebPartZoneID="Main" />
So it looks for my custom form. It works fine for new clients I create, but ones already in the system still point to the standard new form.
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
So I've tried to create an upgrade rule to get the older ones to look at the custom form by doing this:
var list = web.TryGetList("Client Programs"); list.DefaultNewFormUrl = "NewForm.aspx"; list.Update();
But I have a feeling this won't do anything. Is there some way to point the old data to the new custom form through the site settings page, or what would I need to add/change in the upgrade rule to get this working?
I should also mention that in the properties for the form I have changed it to look in the hive for the form and made it an element file.