These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Inserting rawValue as subject in email

RioGrande
Registered: Jun 5 2008
Posts: 2

I have designed several forms in LiveCycle and would like an ID# to be included in the subject line when the user clicks a "Submit Email" button.

The ID# is entered into a field named "ID" in the form.

I created a button (mouse up) and entered the following JavaScript:

var myDoc = event.target;
var g = this.getField("ID");

myDoc.mailDoc({
bUI: true,
cTo: "A [at] a [dot] com",
cCC: "A [at] a [dot] com",
cSubject: g,
cBody: "Body1"
});

When I click the button nothing happens (in preview or in the actual form after it has been saved). Other JavaScript codes have worked fine for me in the past, so I think that I am correctly associating the button with the event, but I may be missing something really basic.

I have been working on this for hours with no luck; any help would be appreciated.

Thanks,

Rio

My Product Information:
LiveCycle Designer, Windows
StevenD
Registered: Oct 6 2006
Posts: 368
It looks like your JavaScript code is Acrobat JavaScript and not the flavor of JavaScript that needs to be used in LiveCycle Designer forms. The two types are very different for example in how they refer to objects in forms.

I am still looking form info on how to populate the parts of an email message such as the subject line from a script if that is possible in this case. So far I haven't spotted anything yet.

StevenD