Expand my Community achievements bar.

Attention: Experience League Community will undergo scheduled maintenance on Tuesday, August 20th between 10-11 PM PDT. During this time, the Community and its content will not be accessible. We apologize for any inconvenience this may cause.

Accessing form data from a Form Guide component

Avatar

Former Community Member
I have built custom Form Guide controls and layouts. I want to access the incoming form data from these custom components. I have two questions:



1. How do I access the data?

2. If I change the data, will the Form Guide Panels, Containers and Fields update themselves?
1 Reply

Avatar

Former Community Member
Kevin,

You have access to the entire XFAModel when customising a Guide in Flex and access the data using the same SOM expression you use in a LiveCycle PDF.

For example, if you LiveCycle form / data structure was like this:



Blah



You can access this by the following (Xfa.instance is a static property - i.e. you don't have to instantiate the object):

--------------------------------
var currentXfa:Xfa = Xfa.instance;

var myFieldObject = currentXfa.resolveNode("rootForm.myFirstPage.myField");

if (myFieldObject.rawValue == "") {
myFieldObject.rawValue = "aNewValue";
}
--------------------------------

In answer to the second part of the question, anything you update in the XFA model in Flex will update the underlying PDF form / data too and vice versa (a script executed in the PDF will update the XFA model in Flex and these changes will be reflected in the Flex app fields). This is achieved by the "Adobe LiveCycle Forms Bridge" (you can see the source if you drag and drop it onto the form from the Custom library palette).

Hope this helps,
John.