-
I don't, unfortunately, but I learned almost all of what I know just by tinkering around a lot. For coding with XML in InfoPath, reading the up on the XPathNavigator class will get you a long way. It's nearly the only XML-related class you'll need to use with InfoPath, and by far the most important methods are ...
-
What exactly do you mean by malicious code? For what will the field values be used where their values might cause harm?
-
Yes, putting something like this in the textbox's changed event would do the trick:
XPathNavigator dateNode = MainDataSource.CreateNavigator().SelectSingleNode("XPath to date node", NamespaceManager);
// Delete the xsi:nil attribute if it is present
XPathNavigator nilAttribute = dateNode.SelectSingleNode("@xsi:nil", ...
-
To validate that a field has more than 1 character, just use the built-in validation options to mark it invalid if it is blank.
Then click the And button and change the dropdown to or to add an expression to mark it invalid if it is greater than 15 characters. That expression would be something like:
string-length(XPath to field) > 15
-
Those instructions make sense to me. Are you sure you modified the manifest the way they described? Perhaps you could attach your manifest.xsf file to this thread so we can have a look?
-
I don't know of any tutorials, but it's really not that complicated. Just create an XML file with the structure that you would like to have, and import it as a "Receive data" data source in Tools->Data Connections. Then use the usual methods (rules/controls/code) to set and receive data from this data source, just ...
-
As you have surmised, selectSingleNode() returns a reference to an XML node, not a control. There isn't really any way to directly interact with an InfoPath control from within the form's code.
To set the value of a node object (usersControl in the code you pasted), you can set the text property.
usersControl.text = ...
-
The code you borrowed is VBScript code, but your form is set for JScript.
-
A section control can be bound to almost anything, so if it's not inside any other sections you could even bind it to the myFields node at the top of your data source. If it is inside another section, you can bind it to the same node as the containing section.
One other option for showing/hiding text is to put the text in an expression ...
-
Pardon me for assuming you knew less than you did.
I think there are ways to get around using that extra boolean field. For example, there is a way to hack the form to allow calling xdExtension functions from rules and (I believe) expression ...