from the MS infopath forum site I was able to obtain the JS code (see code below) to allow Drop Down List selections to be inserted in a tex box.......it works perfectly.
However, when multiple selections are choosen, they are inserted in the text box as follows (this is just an example):
Priority Monitoring Report, Enhancement List Report, Write Up Memo, etc.
It inserts the choosen values as a sentence. What I want to know is, where in the code below (and what the code is) can I insert a code to tell it to do it like this:
Priority Monitoring Report
Enhancement List Report
Write Up Memo.
etc....
Lastly, on the same subject of Drop Down Lists (not using the code below), when a value is choosen, it's inserted into the report underlined. How can I turn that off?
Any assistance you guys can provide me would be greatly appreciated! P.S. I'm using Infopath 2003
Aye
If you noted the Programming Language as JScript, then add the following
code immediately before the last "closing brace" ("}"):
if(eventObj.Operation == "Insert")
{
var objField2 = XDocument.DOM.selectSingleNode("//my:myFields/my:field2");
if(objField2.text == "")
{
objField2.text = eventObj.Site.text;
}
else
{
objField2.text = objField2.text + ", " + eventObj.Site.text;
}
objField2 = null;
}