Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Schema, pre-populated data and submit

Avatar

Level 5

Hello guys,

I'd like a help here.

I've designed a form with a schema defined, a XML data file sample and now it is pre-populating a dropdownlist with the data from XML properly (let's say 50 items). But when I submit the form as XML, is submitting the whole list of 50 items plus the selected one.

Is it possible to submit only the selected item?

To be more specific, how can I choose which fields I need to be submitted?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Diego,

Here is link to a sample form and the XML data.

https://acrobat.com/#d=jC13e8CLueyxcEU7LWM84A

https://acrobat.com/#d=BFnSDSzIVY65BgDSf3KN0Q

The form is with pre-loaded XML. You can find in the docReady event of the DropDown how it works. In the submit button I am removing the nodes of the XML that I am embedding, so that it exports only the value present in the field. I guess you can also do it by removing the script in the docReady event, though not sure you can give it a try.

Thanks.

Bibhu.

View solution in original post

6 Replies

Avatar

Level 9

Hi Diego,

What bindings you have set in the field ?? If you set the binding that fetches the data then all the data will be submiited. You need to get rid of the data binding and to a bit scripting to submit the form.

Thanks.

Bibhu.

Avatar

Level 5

I've set the following binding. My dropdownlist is "InvestmentIncentiveTypes"

with the items being bound to:

$record.InvestmentIncentiveTypes.KeyDisplay[*]

printScreen[18].png

Avatar

Level 9

Hi Diego,

As far as I understood your problem , You need to update certain fields based on the selections made in the DropDown ? Am i correct ?

If yes, you have to remove the data binding, unless it will export all the XML data that you are embedding to it, no matter what you do.

You need to directly read the values of the attributes through the node of the XML you are embedding. It needs a bit of scripting.

Otherwise you can use XSLT to transform the data in which I have no expertise You need to know about the data mapping while doing this.

So, out of the above choices, what you need to do ? It would be great if you can share your form.

Thanks.

Bibhu.

Avatar

Level 5

Hi Bibhu,

My problem is:

I have this dropdownlist which is being populated with data coming from a XML file, and this is working. But I fill down the form and choose an option of this dropdownlist, and when I export the data in XML format, all the options are being exported as well, not only the selected item.

Thanks for the reply, and you have any idea on how I can submit/export only the selected item on dropdownlist instead of the whole list, I'll be gratefull

Diego

Avatar

Correct answer by
Level 9

Hi Diego,

Here is link to a sample form and the XML data.

https://acrobat.com/#d=jC13e8CLueyxcEU7LWM84A

https://acrobat.com/#d=BFnSDSzIVY65BgDSf3KN0Q

The form is with pre-loaded XML. You can find in the docReady event of the DropDown how it works. In the submit button I am removing the nodes of the XML that I am embedding, so that it exports only the value present in the field. I guess you can also do it by removing the script in the docReady event, though not sure you can give it a try.

Thanks.

Bibhu.