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

Insert a Fragment between Table Rows


Level 1


I have no coding skills and I am trying to build a dynamic form using LiveCycle and the internet (along with another colleague). We are building the dynamic form as a series of tables, where the rows are questions. The questions are structured to have yes / no answers, and when an answer is no, we want the user to be able to input a comment.

Currently, we can do this by brute force by building the table with the question as one row, the comment as a row under it. The comment row is hidden on initiation and shown when No is selected. It looks like this:


We would like to code this a little different to make it easier to revise, ect. I have been able insert a row "between" rows using code I found off this site:

var currentRepeatable = this.parent;

var im = currentRepeatable.instanceManager;

var newRepeatable = im.addInstance(1);

im.moveInstance(newRepeatable.index,this.parent.index +1);

However, this only inserts the row that the pull down box is on. I don't want to insert the same row. I want to insert the "Comment" row. So I did figure out how to insert a fragment. I made the comment row a fragment, and hid it. I can get it insert, but only at the bottom of the table. I am using code that looks like this (called when the drop down list is No):

_Comment.addInstance(1).presence= "visible";




Is there a way to insert the fragment "between" rows? I have been trying moveInstance with no success.

Thanks in advance,


0 Replies