Hello all! This is my first post and I'm newbie with InfoPath but I'm learning new things all the time. =)
I have following problem:
I'm attempting to get error count inside group3. Group3 contains group1 with 2 textboxes and group2 with 2 textboxes. Code works just fine with InfoPath filler but when I publish it to SharePoint, and run form in browser it disables/hides all asterisk characters at form.
Here is the code:
XPathNavigator group = this.CreateNavigator().SelectSingleNode("/my:MyFields/my:group3", NamespaceManager);
XPathNavigator errorParent;
int error_count = 0;
FormError[] systemErrors;
systemErrors =
this.Errors.GetErrors(FormErrorType.SystemGenerated);
foreach (FormError err in systemErrors)
{
errorParent = err.Site;
while (errorParent.MoveToParent())
{
if (errorParent.Name.Equals(group.Name))
{
error_count++;
}
}
}