We help IT Professionals succeed at work.
Get Started

Changing from Acrobat to Livecycle

jshiffty asked
Last Modified: 2012-05-09
I use the attached script as a document Javascript called 'SetFieldValues' in Adobe Acrobat. It gets its value from a drop-down box called 'locationdropdown'.

It works great, however we are changing our forms to have flowable content so I have to re-build them with LiveCycle Designer (version 8 if that matters). How and where can I establish this script to work properly in Livecycle. Would it still need to be a document script or do I need to add it to the drop down box scripting somehwere?

I can add files if that would help. Thank you for any assistance!
// Locations Pre-population Data

var DeptData = { Augusta:{  location: "Augusta League of Therapists",
                               address: "336 S. Wayne Ave Waynesboro, Va 22980 ph 540.949.7045 fax 540.949.8897",
                 Charlottesville:{ location: "Charlottesville League of Therapists",
                               address: "911 East Jefferson Street Charlottesville, VA 22901 ph 434.984.0023 fax 434.984.4852",
                 Culpeper :{  location: "Culpeper League of Therapists",
                               address: "120 Sycamore Street Culpeper, VA 22701 ph. 540.829.4006 fax 540.829.0440",
		 Danville :{   location: "Danville League of Therapists",
                               address: "1045 Main St. Suite 4, Danville, VA 24541 ph. 434.791.4131 fax ",
                 Harrisonburg :{   location: "Harrisonburg League of Therapists",
                               address: "312 S. Main St. Harrisonburg, Va 22801 ph. 540.437.1605 fax 540.437.1606",
                 Lynchburg:{  location: "Lynchburg League of Therapists",
                               address: "523 Clay Street Lynchburg, VA 24504 ph.434.455.7990 fax 434.455.0256",
                 "New River":{ location: "New River League of Therapists",
                               address: "7350 Peppers Ferry Blvd Fairlawn, VA 24141 ph.540.633.3816 fax 540.633.3819",
                 "Richmond Area":{  location: "Greater Richmond League of Therapists",
                               address: "10100 Iron Bridge Rd. Suite 102 Richmond, Va 23832 ph.804.778.7443 fax 804.778.7446",
                 Roanoke :{   location: "Roanoke League of Therapists",
                               address: "1420 3rd Street SW Roanoke, VA 24016 ph. 540.343.3577 fax 540.343.3866",
                 "Rockbridge Area" :{   location: "Rockbridge League of Therapists",
                               address: "2424 Magnolia Ave. Buena Vista, VA 24416 ph. 540.264.0100 fax 540.264.0167",
                " Choose Location" :{   location: "Choose Location from drop down",
                               address: " ",


function SetFieldValues(cDeptName)
// Populate fields with values from the Department Data Object
   this.getField("Location").value = DeptData[cDeptName].location;
   this.getField("Address").value = DeptData[cDeptName].address;

Open in new window

Watch Question
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE