These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Import form with flowablw layout

abellad
Registered: Jul 8 2008
Posts: 7

I have imported a form into Livecycle however I get the follwing error about the javascript.

- JavaScript scripts imported from the original PDF file need to be updated to work with Designer. Imported JavaScript scripts have been commented out. Use the Script Editor to review and update scripts attached to the form and form objects.

I have removed the comments from the script but it still does not work. This is error message that I get.

this.getField is not a function

I'm using the script on radio button selection. So depending on the selection various sections of the form will be grayed out.

The javascript I'm using is;

// Type of Change javascript
//Labels
var a = this.getField("2a");
var b = this.getField("2b");
var c = this.getField("2c");
var d = this.getField("2d");
var e = this.getField("2e");

// set them to readonly and grey

a.readonly = false;
a.fillColor = [0];
b.readonly = true;
b.fillColor = ["G", 0.75];
c.readonly = true;
c.fillColor = ["G", 0.75];
d.readonly = true;
d.fillColor = ["G", 0.75];
e.readonly = true;
e.fillColor = ["G", 0.75];

Any help would be greatly appriciated.

Thanks

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
There are a large number of differences between AcroForms JavaScript and the JavaScript used in XML forms. Please looked at [url=http://www.adobe.com/devnet/acrobat/pdfs/lc_migrating_acrobat_xmlform.pdf]Migrating from Adobe Acrobat forms to XML forms[/url] for a brief example of how different the 2 are. For more details and resources see [url=http://kb2.adobe.com/cps/330/330467.php]Scripting languages and resources (Adobe Designer 6.0, LiveCycle Designer 7.x)[/url] and [url=http://partners.adobe.com/public/developer/en/acrobat/sdk/AcroJS_DesignerJS.pdf]Converting Acrobat® JavaScript for Use in LiveCycle™ Designer Forms[/url] for information about specific statements, objects, properties, and methods.

When reading the documents, you will learn that 'this' is not used in LiveCycle Designer.

George Kaiser