Accessibility

TechNote

Data selected from a drop-down list is not saved when the clearItems method is used in the script.

Issue


In XFA dynamic forms, data selected in a drop-down list is not saved when you reopen the form.

Reason


The clearItems method used in the script removes not only the selected items but also the export and default values that are associated with each item. The clearItems method does not work correctly in Acrobat 8.0 and earlier but was fixed in Acrobat 9.0.

Solution


Before calling the clearItems method, save the current value and repopulate the field. Here a sample code that can be used to achieve that:

var curValue = DropDownField1.rawValue;
DropDownField1.clearItems();
DropDownField1.rawValue = curValue;

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:kb405037

Products Affected:

acrobat
livecyclees