Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Creating appearing/disappearing expandable table


Level 2

Again a question coming from a relatively novice user of LiveCycle ES.

I need to create a table, where the table appears or disappears depending on the selection of some radiobuttons.

When the table is visible, there are some dropdown lists that are used to add information to the table.

New table rows can be added by selecting information from 2 ddlists and clicking an "Add" button.

Each row of the table can be deleted at any time.

Here's what I envision:

a) In an area of the form, there are radiobuttons labelled "no access" , "basic access" , and "custom access"

* When you select the "no access" radiobutton... no table appears.

* When you select the "basic access" radiobutton, a table appears - with columns named "Area" and "Door" - and there are some pre-populated entries in the table rows.

* When you select the "custom access" radiobutton, the same able appears with the same columns and the same pre-populated items in the top rows.  Additionally, above the table will appear two dropdown lists (named "Area" and "Door") from which the items are selected... and an "Add" button beside these 2 ddlists.

b) When the "custom access" radiobutton is selected and the table is visible, you can add/delete information to/from the table in the following manner:

* To add information to a new table row, you select an item from each of the 2 ddlists, and click the "Add" button.

* The selected item from each ddlist appears in a new table row, in its respective cell ("Area" and "Door").

* Each individual table row has a "Delete" button so that you can delete the individual row.

c) If you start filling in the table at any time, but then select the "no access" radiobutton, the table will disappear.

Selecting the "custom access" radiobutton again will make the table re-appear with its default information in it... all previous entries would be deleted.

0 Replies


Level 10

I created a quick sample this the kind of thing you had in mind? The initialization of each row is done in the docReady

event of the Form1 node.



Level 2

Very close. 

However, when I copy/paste the stuff from your sample.pdf file into my own PDF file... nothing works anymore.

I have tried renaming pages, subforms, and scripts to make it match the elements in your sample... but I never get it right.

This is likely a very basic thing, but I still haven't gotten the hang of it yet.


Level 10

Its the technique that I was trying to show you will have to adjust the code to fit the structure

of your form.



Level 2

Yes, it is absolutley along the lines of what I was thinking of. 

Some interesting things...  if I am in "custom access" and delete all but one row... then select "basic access" again... the default table rows values do not all re-appear again.  Also, when I go to delete all rows, an error message appears.


Level 10

I did not complete everything. I was merely trying to let you know it was possible. The rows are getting populated on the DocReady event. We coudl move that code do an event that will fire ...or we can run that code ourselves.

For deleting all rows, I have set a minimum value of 2 rows that must appear. I believe that is the error you are getting.



Level 2

Hi Paul,

This is the sort of thing I am looking for.  Ideally I see the rows getting populated by an event other than the DocReady event.  Perhaps an event triggered by the selection of "basic access" or "custom access" from the ddlist?   May we continue to polish this to a final version?

Please forgive that I am still a novice user and am still learning about scripting, etc. as I go along and get help from people such as yourself.

I will need some "hand holding" to copy this over to my own PDF form and make it work there.

I'm sure that once I get it nailed down with some help, the light will go on!   (At least, that's what I'm hoping for.)




Level 10

That makes sense ......asking for help is what this forum is all about.