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.

Question: How to dynamically create multiple rows in a table together

Avatar

Level 2

I'm sure this is obvious to a seasoned person but I'm a newbie (just working with Forms for 1 week).

In the snapshot below I'm trying when I hit the Add button I'd like the two rows below the header in the table to replicate themselves below in the table.

Eventually there will be many rows to replicate. The problem is that I can't find a way to group these and then reference them by the javascript in the "add button" so that they replicate together.

any help/pointers etc. are much appreciated.

Thx

Snap1.jpg

7 Replies

Avatar

Former Community Member

You can only add 1 row at a time .....so if you want to add three rows then you would have to run the command three times.

Make sense?

Paul

Avatar

Level 2

That explains why I couldn't figure out how to do it.

How about ..can I instantiate an entire table over and over at the press of

the add button? I've tried but I suspect I'm just not referencing the object

right or something?

Thanks for your help

George

Avatar

Former Community Member

If the form is setup correctly (the container that holds the table is set to flowed) then it should be possible.

Paul

Avatar

Level 2

Thanks again Paul. I believe the container is set to "flowed" but since I'm

new with forms and Livecycle (although I do know Java) I think I might not

be instantiating the table properly.

for eg. see attachment. I use--> details.addInstance(1)

but it doesn't do anything.

I'm trying to replicate the entire table when I hit the "add item" button

any ideas.

Thanks

George

Avatar

Former Community Member

You can't add attachments here at the moment .....you will have to send it to me via email (LiveCycle8@gmail.com).

Paul

Avatar

Level 2

What was the outcome of this? I am trying to create a form by having a whole table added at the click of a button but can't make it work. This sounds similar but no solution is made available and I can't find anything else on the forums.

Thanks,

Greig