I'm new to infopath and unable to find the exact correct method to change
text in a field on an infopath form. Can anyone help?
Using VS 2003 and the Inforpath Visual Studio Tools.
-L
S.Y.M. Wong-A-Ton - 13 Mar 2006 12:38 GMT
First you need to get to the correct node pertaining to the InfoPath field
using an XPath expression, and then set the "text" property on this node.
Something like
thisXDocument.DOM.selectSingleNode("//my:fieldToSet").text = "myValue"
---
S.Y.M. Wong-A-Ton
> I'm new to infopath and unable to find the exact correct method to change
> text in a field on an infopath form. Can anyone help?
>
> Using VS 2003 and the Inforpath Visual Studio Tools.
>
> -L
Jack - 13 Mar 2006 17:33 GMT
The best solution is to use the functions in the common.js file
included with the samples you get with the Visual Studio Tools. There
is a function in that file called setNodeValue() which should handle
what you need to do.