Hi - thanks for your response. Unfortunately I have no way to link to the form, but here is the only code i have written:
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
SPSite currentSite = SPContext.Current.Site;
SPWeb currentWeb = SPContext.Current.Web;
string idType = string.Empty;
// Write your code here.
XPathNavigator absenceForm = this.CreateNavigator();
XmlNamespaceManager ns = this.NamespaceManager;
SPList claimVariables = currentWeb.Lists["Claim Variables"];
foreach (SPListItem item in claimVariables.Items)
{
if (item.Title.Equals("ID_indicator"))
{
idType = item.GetFormattedValue("Value");
}
}
absenceForm.SelectSingleNode("/my:myFields/my:employee_information/my:idIndicator", ns).SetValue(idType);
if (idType.Equals("ssn"))
{
absenceForm.SelectSingleNode("/my:myFields/my:employee_information/my:empId", ns).SetValue("empty");
}
}
I also discovered that if I load this form from an extended site without forms authentication, it works fine. Any ideas there?
Thanks!