Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

How to select rows of the table in Offline Interactive forms

Avatar

Level 1

Hi Experts,

I am working on Offline Interactive Form.

In this, a prefilled table is displayed on the form.According to the requirement, the user should be able to select any one row of this table, and after the selection I need to check the equipment type of the selected record.Based on this equipment type I need to decide the page number(of the same form) on which the control should navigate.(Here Equipment type is one of the column of the table).

I am thinking of having a radiobutton as one of the fields of the table so that there will be one radiobutton available on the form for each record, so that user can select a single record by these radio buttons.
Please advice if there is any better approach to get this done.

For achieving the functionality as described above (Going to respective page number according to the equipment type) I am planning to use Javascript.But dont know how to as I have no knowledge of the same.
A sample code for the same would be helpful.
Also please guide me  as How to start learning Javascript and any documentation regarding the same would be helpful.

Waiting for your replies.
Thanks in Advance.

Sarang Akhare

1 Reply

Avatar

Former Community Member

I assume that this form is dynamic and you will not know which page the equipment type is on. I woudl recommend that you put a small field (make it 1x1 pixel, with no borders and the same color as the background - this makes it nearly invisible) at the beginning of that section. This field can act as a bookmark. Now when the user makes the selection on the dropdown you can set the cursor in this field programmatically and the form will jump to that location. The beauty is that you do not need to know what page it is on as the field will move with the section no matter where it is. Make sure that you give those bookmark fields unique names.

The code to jump shoudl be on the exit event of teh DDList and the code woudl look something like this:

xfa.host.setFocus("Name of Field to jump to")

Paul