Hi Mike,
Have a look at CMS.FormEngine.FormHelper.GetFormInfo method. It takes one or more class names and returns FormInfo object representing form definition. You can use GetFields method of the FormInfo object to get more details on individual fields including field name, type, default value, etc.
FormInfo fi = FormHelper.GetFormInfo("OM.Contact", false);
var fields = fi.GetFields(true, true);
foreach (FormFieldInfo field in fields)
{
// Do stuff with field.Caption or field.Name
}