Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Dynamic Floating Fields?

$
0
0

Hi There,

 

I'm still very new to LiveCycle and I've run into a problem. I have a script on a button that sends an email. I have an email 'template' text field which I populate with data inputted from a form that's filled out by the user. Now, I can get the body of the email to be the content of the text field where the email is being 'built' -- when I go to preview and fill out my form, then scroll down to the email template where all the data is being captured it's all there using floating fields, however when I click the submit by email button, it grabs the static text but not the values of the floating fields.

 

The script on the submit button looks like this:

 

var oDoc = event.target;

oDoc.mailDoc({

cTo: AutomatedEmail.fldTo.rawValue,

cSubject: AutomatedEmail.fldSubject.rawValue,

cMsg: AutomatedEmail.fldMessage.rawValue,

});

 

So I have the form that's being filled out, and then there is a subform which contains a text object that looks something like this:

 

 

Dear {OwnerName}

 

Static text Static text Static text Static text Static text Static text Static text Static text Static text Static text

Date Account Updated: {AcctUpdated}

Date Received: {Received Date}

 

 

Etc...

 

So when I click 'Submit by Email' It'll grab the above static text, but the floating fields it won't. Is there any way around this? My solution right now is I've basically  hard coded the entire email and grabbed all the values one by one from their text objects like so :

 

AutomatedEmail.fldMessage::calculate - (JavaScript, client)

 

 

var br = "\n";

var text1 = OwnerFirstName.rawValue;

var text2 = "Please accept this e-mail as confirmation that the we have received the ";

var text3 = CurrentYear.rawValue;

var text3 = "account information for";

var text4 = CompanyName.rawValue;

 

//Then I build the email body

 

this.rawValue = Text1 + "," + br + br + Text2 + " " + text3 + " " + text4 .... you get the idea.

 

^^ This is really long and very cumbersome when I want to make changes it takes forever. I'd like to be able to do what I mentioned above with floating fields, as that way I can just open the subform where my email template is, edit text, move floating fields around etc. The method that I'm using works, but it's just not as efficient.

 

Any help or maybe a better way to do this would be greatly appreciated!!!


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>