Print Page | Close Window

Radio button to determine what text is put into th

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: [Commercial] Adobe LiveCycle Designer Forms
Forum Description: Discussions relating to Adobe LiveCycle Designer and XFA forms.
Printed Date: 23 Oct 2019 at 5:58am
Software Version: Web Wiz Forums 11.10 -

Topic: Radio button to determine what text is put into th
Posted By: Erick
Subject: Radio button to determine what text is put into th
Date Posted: 11 May 2015 at 6:07pm


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 = " - ";
var cCCAddr = " - ";

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")
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")
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")
cBodyh = "Request to have name changed to - " + "\n" + "\n"; ="mailto:" + cToAddr + "?cc=" + cCCAddr + "&subject=" + cSubLine
+ "&body=" + cBodya + cBodyb + cBodyc + cBodyd + cBodye  +cBodyf  + cBodyg + cBodyh ;

  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






Posted By: gkaiseril
Date Posted: 11 May 2015 at 7:11pm
You code looks like a mix of LiveCycle FormCalc and Acrobat JavaScript.
You need to tell us what program you are using to create the form.
Both FormCalc and JavaScript have code that denotes the start and end of a block of code to run conditionally. I see none of that code syntax in you code.

Posted By: Erick
Date Posted: 11 May 2015 at 7:21pm
I'm Using Livecycle Designer ES3. I wasn't aware that I was mixing code, I'm fairly new to this. What part is FormCalc? Thanks for the help

Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 -
Copyright ©2001-2017 Web Wiz Ltd. -