Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

XML Schemas and Designer

Avatar

Former Community Member
I am looking at enhancing my XML schemas to better create PDF forms. It was hinted that the Schema can use some of the forms XFA properties, but does not describe it in detail. I would like the ability to have my validation messages, labels, and possibly font and color described in the schemas. I do realize that the schema is a data divination but would cut down on dev time if we can set these properties in the schema. How far can designer take the schema concept. I would like examples if possible. limelifter@hotmail.com
20 Replies

Avatar

Former Community Member
I have tried to find a way to have Designer import display, edit, or

data patterns from the XML schema (restrictions) to no avail. I have

also looked for a way to import captions for text fields

(xs:documentation?) and haven't had any luck with that either.

Hopefully this capability will be provided in the future. As far as

font and color is concerned, you could put the formatting information

into your xml data and use rich text, but I don't know of a way to put

this information into the schema.



Justin Klei

Cardinal Solutions

www.cardinalsolutions.com

Avatar

Former Community Member
Unfortunately, what you're asking for can't be done in LC Designer.



Only properties directly specifiable in XML Schemas can be mapped to XFA form objects and/or properties. For example, XML Schemas can encode the maximum number of characters for element content and therefore this information is mapped to the
maxChars property on a text field.



This should all be documented in the
How LiveCycle Designer determines the field type when binding to data topic in the LC Designer help file.



The only explicit XFA properties that can be added to a schema, using the XFA Namespace, are
contentType (for rich text and images)

and
href (for images). This is also documented in the LC Designer help file (under the same topic indicated above).



As for messages, font, color, etc., these aren't in the W3C XML Schema Specification and therefore can't be mapped.



Stefan

Adobe Systems

Avatar

Former Community Member
FormBuilder@adobeforums.com wrote:

> Unfortunately, what you're asking for can't be done in LC Designer.

>

> Only properties directly specifiable in XML Schemas can be mapped to XFA form objects and/or properties. For example, XML Schemas can encode the maximum number of characters for element content and therefore this information is mapped to the maxChars property on a text field.

>

I understand what you're saying, but patterns ARE directly specifiable

in XML schemas using the 'restriction' and 'pattern' elements, yet this

information does not get imported into the form template when you bind

to the schema. Because of this, there is a lot of rework required to

"recode" this pattern logic into the form. I would expect this pattern

to be mapped to a data, edit, or display pattern for the field.



Justin Klei

Cardinal Solutions

www.cardinalsolutions.com

Avatar

Former Community Member
The problem with "pattern" is that an XML Schema pattern is a regular expression pattern and XFA Picture syntax is unique to XFA (and nothing like the usual regular expression syntax) therefore making the task of mapping between the two very difficult.



Ideally, regular expression support would be added to XFA Pictures and you would be good to go but it's just not supported at this time.



Stefan

Adobe Systems

Avatar

Former Community Member
I was just talking to the developer that worked on the schema support in Designer and they were reminded of the Dynamic Bindings feature.



Using Dynamic Bindings, you can can directly bind messages to data described by the schema (rather than properties defined by the

schema). In theory, although the Dynamic Binding UI in LC Designer doesn't support these, complex binding can do the same for font and color. The catch is that you would have to hand-craft these "unsupported" bindings in the XML Source yourself.



To activate the Dynamic Bindings feature, go to the "Tools | Options..." menu, select "Data Binding" on the left panel and check the
Show Dynamic Properties check box on the right panel. Once you've done this, all object properties that are supported by the Dynamic Binding UI will show-up in green and will be underlined. Just drop a text field on the form, go to the Object palette's Field tab and click on the green-underlined
Caption label. You'll then be presented with the Dynamic Properties dialog for that specific property. From there, you can setup a binding and see what the syntax is so you can replicated it for other properties like font and color.



Stefan

Adobe Systems

Avatar

Former Community Member
FormBuilder@adobeforums.com wrote:

> I was just talking to the developer that worked on the schema support in Designer and they were reminded of the Dynamic Bindings feature.

>

> Using Dynamic Bindings, you can can directly bind messages to data described by the schema (rather than properties defined by the

> schema). In theory, although the Dynamic Binding UI in LC Designer doesn't support these, complex binding can do the same for font and color. The catch is that you would have to hand-craft these "unsupported" bindings in the XML Source yourself.

>

> To activate the Dynamic Bindings feature, go to the "Tools | Options..." menu, select "Data Binding" on the left panel and check the Show Dynamic Properties check box on the right panel. Once you've done this, all object properties that are supported by the Dynamic Binding UI will show-up in green and will be underlined. Just drop a text field on the form, go to the Object palette's Field tab and click on the green-underlined Caption label. You'll then be presented with the Dynamic Properties dialog for that specific property. From there, you can setup a binding and see what the syntax is so you can replicated it for other properties like font and color.

>

> Stefan

> Adobe Systems



Is this 7.1 functionality? I am not seeing these options in 7.0.

Avatar

Former Community Member
Yes, dynamic bindings are new to 7.1.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
While the UI was new to 7.1, it's possible that the version of XFA use by Designer 7.0 was XFA 2.2 and if so, you should be able to hand-code the dynamic bindings.



Here's some examples of a dynamic bindings on a text field which bind a node in the data connection (named "DataConnection") to both the caption and validation pattern message properties:



<setProperty target="caption.value.#text" connection="DataConnection" ref="$record.DataConnection.title"/>

<setProperty target="validate.message.formatTest" connection="DataConnection" ref="$record.DataConnection.title"/>


If this isn't supported in 7.0, you'll find-out rather quickly because when you return from the XML Source tab, you'll get an error message indicating that the <setProperty&tg; element is invalid.



Beware, however, that this functionality likely isn't supported in 7.0 because the functionality wasn't officially exposed until 7.1. Upgrading to 7.1 is easy to do and doesn't cost much, if you're interested:
http://www.adobe.com/products/server/adobedesigner/main.html You can also try it out with a demo version by following the
Test drive the Adobe LiveCycle Designer link (second from the top in the
Learn Mode column on the right-hand side).



Stefan

Adobe Systems

Avatar

Former Community Member
Unfortunately, I've just confirmed that none of this is available in 7.0. The Dynamic Binding feature is only available as of 7.1.



Stefan

Adobe Systems

Avatar

Former Community Member
FormBuilder@adobeforums.com wrote:

> Unfortunately, I've just confirmed that none of this is available in 7.0. The Dynamic Binding feature is only available as of 7.1.

>

> Stefan

> Adobe Systems



Thanks! I'll upgrade to 7.1 when I get the opportunity to do so.

Are there release notes on the Adobe website somewhere that document

what features were added with 7.1?



Justin Klei

Cardinal Solutions

www.cardinalsolutions.com

Avatar

Former Community Member
I can't find a web page that describes what's new in Designer 7.1 but in the Designer 7.1 help documentation, there's a
What's New topic. You'd have to install the demo version to be able to use the help file so I figured I would just list the content here for your convenience.






Tables



LiveCycle Designer now lets you create tables. A table is made up of rows and columns of cells that can contain form fields or show data. You can quickly create a static or dynamic table using the Table Assistant. Static tables have a fixed number of columns and rows. Dynamic tables have a fixed number of columns but the number of rows in the table will change depending on how much information is in the data source. LiveCycle Designer supports simple, complex, and nested tables.




Language-Specific Features for Arabic, Hebrew, Thai, and Vietnamese



LiveCycle Designer now supports Arabic, Hebrew, Thai, and Vietnamese. The characters in Arabic, Hebrew, Thai, and Vietnamese are context-sensitive, that is, different images are used for the same character depending on its position within a word and some characters are made up of a combination of several characters. These languages are referred to as complex scripts.



Arabic and Hebrew are right-to-left languages. LiveCycle Designer now supports right-to-left or bidirectional text. Bidirectional text occurs when texts of different direction orientation appear together.





Note:
LiveCycle Forms 7.1 does not support form designs that contain Arabic, Hebrew, Thai, and Vietnamese fonts.




New Paper Forms Barcode object



With LiveCycle Designer, you can add two-dimensional (2D) barcodes to interactive PDF forms using the Paper Forms Barcode object. You can then publish the barcoded forms to a website or distribute them by email or CD. When a user fills a barcoded form by using Adobe Reader, Acrobat Professional, or Acrobat Standard, the barcode is updated automatically to encode the user-supplied form data. The user can submit the form electronically, or print it to paper and submit it by mail, fax, or hand. Using LiveCycle Barcoded Forms you can later extract the user-supplied data as part of an automated workflow, routing the data among approval processes and business systems. For example, you can create a LiveCycle workflow by using LiveCycle Workflow to include business processes specific to LiveCycle Barcoded Forms. When integrated with LiveCycle Workflow, a single unified forms process can easily support different paper form submissions, each with their own specific workflow.



The Paper Forms Barcode object in LiveCycle Designer includes the following changes and additions for specifying the settings for capturing and encoding the user-supplier form data:




Symbology In addition to PDF417, LiveCycle Designer now supports barcodes encoded with industry standard QR Code and Data Matrix symbology.




Encode select objects You can select only the required objects to be encoded in a paper forms barcode and save them as a collection.




Dynamic form object properties



LiveCycle Designer now lets you set up dynamic properties for form object properties. This means that you can assign values from a data source to form object properties that LiveCycle Designer updates at run time. For example, the items in a drop-down list can be populated with a list of countries that are stored in a data source.



Dynamic properties allow you to modify form object properties outside of the form design and rely on a data source. This can be useful in deployment and maintenance scenarios. In addition, the same data source can supply data to different form designs. For example, a long list of countries can be stored in one data file and used in many forms. You can use dynamic properties to implement functionality formerly possible only with scripting.




Descriptions in the Hierarchy and Data View palettes



You can now view captions or descriptions of the objects in the Hierarchy and Data View palettes. These provide more information about the objects when you are building a form.




Controlling subform breaks based on data



You can now use conditional breaks to manually specify when and how to manage subform breaks. Conditional breaks allow you to verify data for a field within a repeating subform against previous instances of that field. The repeating subform can then be broken up according to the change in the data supplied to the field, and if required, automatically generate a new page.




Compatibility with version 6



You can use the Compatibility tab in the Form Properties dialog box to update forms that were created in LiveCycle Designer version 6 to version 7. If the older form will be viewed primarily with Acrobat 7.0 or Adobe Reader 7.0 or later, use the Compatibility tab.





Stefan

Adobe Systems

Avatar

Former Community Member
Thanks for the help. i will have to try this out in 7.1 Will upgrade soon.

Avatar

Former Community Member
I am trying to use the Dynamic properties to pull up a list of records and then once i choose one it fills in other data fields on the form. This works for ONE field but I can't make it populate multiple fields on the form so Item Text: title, Item Value: showTime

What if I want it to populate showTime AND showLocation?



Thanks!

Greg

Avatar

Level 7
You have to populate each field individually as required, unless you can use arrays where the associated elements of each array have the same element position and then you could use a "for" loop to loop through the elements of each array.

Avatar

Former Community Member
Huh?

I am a newbie to this tool. I am not sure how to do the above comment.



Thanks!



Greg

Avatar

Level 7
Your records are coming from where? If it is Database, then use the index value to retrieve the appropriate individual record. If it is an entry in a drop down box, you will have to write code to populate the appropriate fields with the correct information by either an "if then elseif..." statement, use the "switch(statement){...}" or indexing into an data object, http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/change_another_field/ (since this was written for Acrobat Forms, you will need to adjust it for LiveCycle Designer.

Avatar

Former Community Member
Geo,



My records are coming from an oracle database. How can I get it to use my Oracle SQL to get the data? I see how it works for object data that is hard coded but I tried this for the database side:



----- form1.Screen.ZZ_EEID::change: - (FormCalc, client) -------------------------------------------



this.getfield("ZZ_RISK_RT").value = $.boundItem(xfa.event.newText).ZZ_RISK_RT;

this.getfield("ZZ_MATRIX_RT").value = $.boundItem(xfa.event.newText).ZZ_MATRIX_RT;

this.getfield("ZZ_CONTRIB_RT").value = $.boundItem(xfa.event.newText).ZZ_CONTRIB_RT;

this.getfield("ZZ_OVERALL_RT").value = $.boundItem(xfa.event.newText).ZZ_OVERALL_RT;



This was the only bit of code I changed but it is not working for me. I am sure I am missing something simple! So please be gentle :)



Thanks,



Greg

Avatar

Former Community Member
OK. After reading more I have now done this and it is still not working nor is my drop down working anymore - Please Help:

----- form1.Screen.ZZ_EEID::initialize: - (JavaScript, client) -------------------------------------



var sDataConnectionName = "AbraData";

var sColHiddenValue = "ZZ_EEID";



var nIndex = 0;

while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName)

{

nIndex++;

}

var oDB = xfa.sourceSet.nodes.item(nIndex);

oDB.open();

oDB.first();



var nDBIndex = 0;

while(oDB.nodes.item(nDBIndex).className != "command")

{

nDBIndex++;

}



var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");

var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");



oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF","bofAction");

oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF","eofAction");



this.clearItems();



nIndex = 0;

while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)

{

nIndex++;

}

var oRecord = xfa.record.nodes.item(nIndex);



var oValueNode = null;

var oTextNode = null;



for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)

{

if(oRecord.nodes.item(nColIndex).name == sColHiddenValue)

{

oValueNode = oRecord.nodes.item(nColIndex);

}

}



while(!oDB.isEOF())

{

this.addItem(oValueNode.value);

oDB.next();

}



oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup,"bofAction");

oDB.,nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup,"eofAction");



oDB.close();



----- form1.Screen.Button1::click: - (FormCalc, client) --------------------------------------------



if (HasValue(ZZ_EEID)) then

$sourceSet.AbraData.#command.query.commandType = "text"

var sqlString = Concat("Select ZZ_EEID, ZZ_RISK_RT, ZZ_MATRIX_RT, ZZ_CONTRIB_RT, ZZ_OVERALL_RT From PS_ZZ_RATING Where ZZ_EEID = '",

Ltrim(Rtrim(ZZ_EEID.rawValue)),"'")

$sourceSet.AbraData.#command.query.select.sqlString

$sourceSet.AbraData.open()

endif

Avatar

Former Community Member
Hi there, I'm creating a new form from a PDF file. It is basically a big table, and I need to change the orientation of the text, for the text field. Specifically rotate text up. Similar to the function in Excel, that you can change text orientation anywhere. Somebody has any idea how to do this with Adobe liveCycle designer?, if so, please help me.. THANKS A LOT!!!

Avatar

Former Community Member
iam kinda new to Adobe. Is it possible to encode a 2D barcode with Arabic text using adobe forms and then extract the encoded data to a adobe form using a handheld 2D barcode device