I have created a new edit form for my SPList via Sharepoint Designer and haven't deleted the old ones. I know how to get all the forms, but how to distinguish default forms from the rest?
I can see in Sharepoint Designer which one is set to default, but can I get this information programatically?
My current function gets all the forms and distuingishes only by PAGETYPE. What can I improve?
public static string getFormName(string listName, PAGETYPE formType)
{
SPFormCollection forms = SPContext.Current.Web.Lists[listName].Forms;
foreach (SPForm form in forms)
{
// todo: how to choose default form
}
return formName;
}