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

Radio button to determine what text is put into the body of an email

$
0
0

Hi all,

I need some help with a radio button and java scripting. This is the code I'm using on a button with a mouse up event using Java script run at the client

 

var oSubmit = this.resolveNode("$..#submit");

 

var cToAddr = "abc@sdf.org";

 

var cCCAddr = "abc@sdf.org";

 

var cSubLine = "Security Access Authorization";

 

var cBodya = "Dear Help Desk," + "\n" + "\n" +

 

"This email serves as my electronic approval for " + "\n" + "\n"

 

var cBodyb = "============ SECURITY ACCESS REQUEST DETAILS ================" + "\n" + "\n"

 

var cBodyc = (EffDate.length = "")

 

  if(EffDate.rawValue)

 

cBodyc = "Effective Date - " + EffDate.formattedValue + "\n" + "\n"

 

var cBodyd = (RadBut.length == "2")

 

  if(RadBut.rawValue)

 

cBodyd = "Status - Create New User Account" + "\n" + "\n"

 

var cBodye = (RadBut.length == "3")

 

  if(RadBut.rawValue)

 

cBodye = "Status - Add/Remove Access" + "\n" + "\n"

 

var cBodyf = (RadBut.length == "5")

 

  if(RadBut.rawValue)

 

cBodyf = "Status - Terminate" + "\n" + "\n"

 

var cBodyg = (RadBut.length == "1")

 

  if(RadBut.rawValue)

 

cBodyg = "Status - Department Transfer from " + "\n" + "\n" 

 

var cBodyh = (RadBut.length == "4")

 

  if(RadBut.rawValue)

 

cBodyh = "Request to have name changed to - " + "\n" + "\n";

 

oSubmit.target = "mailto:" + cToAddr + "?cc=" + cCCAddr

 

+ "&subject=" + cSubLine

 

+ "&body=" + cBodya + cBodyb + cBodyc + cBodyd + cBodye  + cBodyf  + cBodyg + cBodyh ;

 

 

this is the test layout I'm using

1.JPG

 

2.JPG

 

No matter what I try, it always put all of the choices in the body of the email, not just the one I checked. any help would be greatly appreciated...Thanks Erick


Viewing all articles
Browse latest Browse all 5571

Trending Articles



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