Expand my Community achievements bar.

Using a field value as subject in Email Submit - help

Avatar

Former Community Member

Hi there,

I am new to the forums and very new to LiveCycle and XML and Java.

All i need is some hopefully very simple help.

I have a PDF form, and all i want is when i click the submit button it uses the value entered into the textbox called JobCode as the subject in the email.

how to do i adapt it to this code:

<event name="event__click" activity="click">
    <submit format="xml" textEncoding="UTF-8" target="mailto:xxxx@xxxx.com.au?subject="/>
</event>

What do i type or where do i put whatever to make it work. it should be simple.

Thank you in advance

Jason

1 Reply

Avatar

Former Community Member

GOT IT...

After a lot of mucking around and then leaving to watch a movie then coming back with a fresh mind i nailed it.. haha

feel like a bit of a goose cause i couldnt figure it out earlier but i got now..

i needed to use

var oJobCode;
var oSubmit;
var oSubject;
var oBody;
oJobCode = form1.Page1.JobCode.rawValue;
oSubmit = form1.Page2.TrdsRspn.rawValue;
oSubject = "Job Code: "+ oJobCode;
oBody = "Works Report Submitted by: " + oSubmit;
event.target.mailDoc({bUI: true,cTo: "xxxx@xxxx.com",cCC: "",cSubject: oSubject,cMsg: oBody});

AND BAM!

Works perfectly.