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.

Binding objects

Avatar

Level 2

I need to be able to bind two objects without using a data source.

Meaning:

If from StateDropDownList  I select Texas.  Then on anohter drop down, say CountyDropDownList, I want my selection to be only counties in Texas.

Can this be done without connection to a data source?  Can I type the values within LIfeCycle?

Thanks for any suggestions.

2 Replies

Avatar

Level 7

Hi,

There is a good example of this on a sample form that gets installed with LC Designer. Use the help function and search for "Sample Forms".  It will show you the location on your hard drive where the Sample Forms are. The "Purchase Order" Sample Form has a similar feature you want--populates states for the country chosen (USA vs Canada). If you choose USA in the 1st dropdown, then only the USA states populate the 2nd dropdown.

There are other ways, but looking at the sample forms should be helpful.

Good luck!

Stephen

Avatar

Level 2

The Purchase Order form is helpful and what I need, but I'm still not having success with my document.

The PO shows in the Initialize event and the Change event the following for the 1st drop down:

form1.purchaseOrder.header.drpOrderedByCountry::initialize - (JavaScript, client)

// Populate this field with the country names currently listed.

countryScript.getCountries(

this);

form1.purchaseOrder.header.drpOrderedByCountry::change - (JavaScript, client)

// Update the state/province field when a different country is selected.

countryScript.getStatesOther(xfa

, drpOrderedByStateProv);

How does "countryScript......" relate?  How do I know what script I should write?

Thank you.