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.

Print form with dynamic dropdown

Avatar

Level 4

Dear all,

I have a form (xdp) with dynamic dropdown inside. (i.e. The value list is empty in design time)

And I have a problem that the print out (via the sendToPrinter service) will have the data value (e.g. EN) instead of the display value (e.g. English) for all the dynamic dropdown.

Would like to know if there are any solution beside mapping all the values from data value to display value before print?

Thanks in advance

Regards

Bill

6 Replies

Avatar

Level 10

You can make the drop-down list visible for Screen Only, so that they will not appear in the printout.

Similarly you can have hidden text fields (as Visible Print Only, so that they will not appear in the screen).

On change event of the drop-downs write:

hiddenField.rawValue = event.newText;

This will print you the data of the dropdown instead of the mapped data.

Nith

Avatar

Level 2

Since our orgnatization has updated from Reader 6/7/8 to Reader 9.13 and Reader 9.2, the visible on screen text now prints when the form is rendered in Workspace. If I use Professional 8 in Workspace, the screen text does not print.

Avatar

Level 4

Hi $Nith$,

Thanks for the reply and sorry for the late reply.

But I would like to know if there are some better solution than that one, because it need to change too much, and add so many object to the form and make it much slower.

And I have another problem about dynamic form printing, which is to handle the object set visible or invisible by script, because it seem that the script did not run when I flatten the PDF, and I cannot think of any workaround to handle that.

Regards

Bill

Avatar

Level 10

Another solution is multiple templates!

Create another template with your desired fields settings and transfer data from dynamic PDF to the new template (static form).

This will not workout if you need to make fields visible/invisible on conditions.

-Nith

Avatar

Level 4

Hi Nith,

Thanks for the reply.

I also think of this solution before, but I would like to know are there any better soultion than that.

Because our form have quite a few combination, and this will result in too many template to maintain, which is not a good idea in a long run.

Regards

Bill

Avatar

Level 1

I'm also seeking the better solution instead of

a) creating 2 field - one for capture data, one for printing (and it doesn't work using LC ES server component)

b) creating 2 templates - one for capture data, one for printing (maintenance overhead)

Ideally & logically, this should be achieve by using one field since it has already come with the presence & relevant attribute.

Anyway, the main problem, why dropdown data is printed instead of display value?

The user doesn't even know what's the technical data behind the dropdown screen value he/she selected.

From user point of view, nobody wants to see the technical data printed instead of the display value...