Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

submitted data from drop-down list

Avatar

Former Community Member
Hello All,

I got the following problem:
I made a XDP template with a drop-down box with the following databinding:

1
Groningen


2
Veendam


3
Enschede


The dynamic properties of the drop-down list are:

Binding: $record.LOCATION[*]
Item text: CITY
Item value: ID

When I preview the form in Livecycle Designer is it showing three locations what is good. But when I submit the form, it is submitting all three locations. Is it possible that the form submits only the selected data from the drop-down list?
2 Replies

Avatar

Former Community Member
When you use the Dynamic Property feature, you're essentially causing the data mapped via the schema loaded in the data connection to be imported into the form at runtime (when previewing in Acrobat or just running the form in Acrobat stand-alone). Because of this, the data becomes part of the data model and is therefore submitted along with any other data. Until Designer lets you specify an alternate data file for the specific purposes of the Dynamic Properties feature (and this data can therefore be discarded once the list has been populated), everything goes into the same data model and is submitted together.



In order to get the form to submit the selected value in the drop down list, you'll need to add an empty node to your data file to which the drop down list's value will be bound. When you use Dynamic Properties to populate the list, you're not actually creating any bindings between that field and a node in the schema (which maps to a location in the data file). Think of the Dynamic Properties as a one-way or an import-only function. By adding an empty node (called ListSelection in this sample):



<data>

<LOCATION>

<ID>1</ID>

<CITY>Groningen</CITY>

</LOCATION>

<LOCATION>

<ID>2</ID>

<CITY>Veendam</CITY>

</LOCATION>

<LOCATION>

<ID>3</ID>

<CITY>Enschede</CITY>

</LOCATION>


<ListSelection/>

</data>


and explicitly binding the drop down list to it (by specifying "$record.ListSelection" as its Default Binding on the Object palette's Binding tab), you'll cause the value (selected item) of the drop down list to be loaded (in this case, it would be initially empty) and saved to this node in the data. The consuming application (the one which later loads this data to interpret it) would have to ignore the <location> nodes.



I've attached a sample form which has a drop down list hooked-up to the data file I listed above. It uses Dynamic Properties to populate its list and explicit binding to the ListSelection node to load/save its data. To load the data into the form, open it in Acrobat, choose "Form Data | Import Data to Form..." from the "File" menu and choose the data.xml file included in the ZIP file.



Stefan

Adobe Systems