I'm learning infopath and designing the form. I have couple of questions -
I would like to know how to display alerts in infopath.
I'm not using data validation and I have some required fields. I would like to check if required field is empty, then disable the submit button. If not, enable the submit button.
I have a textbox. is there a way to update the text in infopath form.
public void rank_Validating(object sender, XmlValidatingEventArgs e)
{
//Ensure validation is only done when inserting or changing a value if (e.Operation == XmlOperation.Insert || e.Operation == XmlOperation.ValueChange)
{
//Check the Length of the NewValue of the field if (e.Site.InnerXml.Length <= 4)
{
string Newrank = e.Site.InnerXml.PadLeft(4,'0');XPathNavigator field = this.MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:rank", this.NamespaceManager);
field.SetValue(Newrank);
}
}
}
I would really apreciate if someone can help me to resolve these issue. I have been struggling for a week.
Thanks,
-Shraddha